Mac shortcuts

cmd+W – close window
cmd+Q – quit window
cmd+tab – switch windows

alt + cmd + space – open finder
cmd + shift + m – toggle zoom: maximize/minimize window
cmd + m – minimize application to dock icon (un-minize – select app with cmd+tab, while pressing cmd, start pressing alt and release cmd)
F5 for Reload This Page – System Preferences/Keyboad/Shortcuts/App Shortcuts/+ to add Google Chrome application, title Reload This Page/shortcut F5
F11 – show desktop
F3 – show mission control (all windows) or 3 fingers swipe up
ctrl+ down arrow – show Application Windows for (App Expose) or 3 fingers swipe down
ctrl + up arrow – show Mission control
ctrl + F8 + down arrow + down arrow + enter – lock screen (Utilities/KeyChain Access/Preferences/General: check: Show keychain status in menu bar)

Terminal:
alt + right/left arrow – move one word forward / backward
ctrl + A / E (or fn + shift + left/right arrow) – move to the begin / end of line

TextEdit/Browser (alt and cmd):
alt + right/left arrow – move cursor one word forward/backward
cmd + right/left arrow – move to end/begin of line (also ctrl + right/left when disabled remapped Mission Control)
cmd + up/down arrow  – move cursor to home/end
fn+right/left arrow – go to home/end
fn+up/down arrow – page up/down (curson does not move)
shift + alt +right/left – select one word from cursor to right/left
shift + cmd + right/left – select words from cursor to end/begin of line
cmd + c / v / x – copy / paste / remove
ctrl + tab – move between tabs in chrome
cmd + alt + shift + v – paste formatted text but adjust to the format of target text

Vim (fn and ctrl, does not use cmd so be able use the same keys in Windows/Linux):
fn + right/left – move to the begin/end of line (fn since no home/end button)
ctrl + right/left – move to the one word forward/backward (with disabled/remapped Mission Control)
cmd + shift + v – paste selected text (needs to be selected via mouse)

My Intellij (fn and ctrl, does not use cmd so be able use the same keys in Windows/Linux):
fn + right/left – move to the begin/end of line (fn since no home/end button)
ctrl + right/left – move one word forward/backward (with disabled/remapped Mission Control)
shift + fn + right/left – select words from curson to the begin/end of line
shift + ctrl + right/left – select one word forward/backward (with disabled/remapped Mission Control)
ctrl + c / v / x – copy / paste / remove

Setup

    1. Turn off AutoCorrect: Apple Menu > System Preferences > Keyboard > Text and turn  Autocorrect off by unchecking Correct spelling automatically
    2. Add ssh autocompletion for bash by appending ~/.bash_profile or ~/.bashrc:
_complete_ssh_hosts ()
{
    COMPREPLY=()
    cur="${COMP_WORDS[COMP_CWORD]}"
    comp_ssh_hosts=`
#        cat ~/.ssh/known_hosts | \
#        cut -f 1 -d ' ' | \
#        sed -e s/,.*//g | \
#        grep -v ^# | \
#        uniq | \
#        grep -v "\[" ;
        cat ~/.ssh/config | \
        grep "^Host " | \
        awk '{print $2}'
    `
    COMPREPLY=( $(compgen -W "${comp_ssh_hosts}" -- $cur))
    return 0
}
complete -F _complete_ssh_hosts ssh
    1. Terminal prompt structure and colors:
export PS1="\[\033[01;32m\]\u@MacBook\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ "
export CLICOLOR=1
export LSCOLORS=ExFxBxDxCxegedabagacad
alias ls='ls -Gh'

brew install svn (append .bash_profile: export PATH=/usr/local/bin:${PATH})
brew install maven
brew install cntlm

Settings -> Keyboard/Text: disable use smart quotes and dashes

Finder -> Preferences/Advanced/Show all filename extensions

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s