Anyone who has done regular programming in a Linux environment is quite shocked when forced to sit at a Mac: the terminal program doesn't have niceties installed, there are too many keyboard modifier keys, the home/end/page-up/page-down keys don't behave as expected, and much much more.
Whether or not you suffer when using a Mac to program, this page will allow you to get your environment to an arguably optimal state.
Install better touch tool
Sometimes you unplug a monitor and a window will with the window control buttons above the screen. In Linux, you just press and hold Alt, and you can drag the window back down, but not in Mac.
Download Stay: http://cordlessdog.com/stay/
During presentations, you sometimes want to temporarily disable the screensaver/screenlock.
Install caffeine, and set it to be 2 hour timeout: https://itunes.apple.com/us/app/caffeine/id411246225?mt=12
Install GNU Emacs: http://emacsformacosx.com/
edit ~/.bash_profile
alias emacs="/Applications/Emacs.app/Contents/MacOS/Emacs -nw"
Shift + Option + Command + V pastes with the formatting of the document you are pasting into (not from), which is sorta the same thing. It won't carry across the formatting from the previous document.
- Open 'System Preferences', select 'Keyboard'
- Select tab 'Keyboard Shortcuts'
- Select 'Application Shortcuts' from the left listbox
- Click '+' below right listbox
- Select 'All Applications' for 'Application' input box
- Type 'Paste and Match Style' into the 'Menu Title' input box
- In the 'Keyboard Shortcut' input box, pretend that you are about to paste something by typing command-v. There should now be the cloverleaf command sign followed by a -v in this box.
- Click add.
My mac slows down for mysterious reasons sometimes. Most of the time it is obvious if I have proper monitoring in place.
Install hardware utilization monitors: http://www.ragingmenace.com/software/menumeters/index.html
Unstupid Finder:
Install HomeBrew: http://mxcl.github.com/homebrew/
NOTE: This requires XCode be installed.
For an integrated shell, iterm2 isn't bad.
At one time I used xterm, but it was hard to overcome the "non-nativeness" of X11 apps...
PAGER is set to more? EDITOR vi? What decade is this from? Step into the '90s with these settings:
Edit ~/.bash_profile:
# Set this to your preferred editor
export EDITOR="emacs" # alias set above
# Set this to get a modern pager in man pages
export PAGER=less
Install inconsolata: http://www.levien.com/type/myfonts/inconsolata.html
This is the number one complaint heard. For some reason, robust tab completion has been an integral part of the Linux shell experience for ever. Why this isn't the case with all *nix flavored shells is baffling.
Install bash-completion package with:
brew install bash-completion
Then follow the instructions it gives for editing .bash_profile
Based on docs found here http://git-scm.com/book/en/Git-Basics-Tips-and-Tricks:
CFILE=/usr/local/etc/bash_completion.d/git
sudo curl -o $CFILE https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash
sudo chmod a+x $CFILE
Edit ~/.gitconfig
[alias]
co = checkout
ci = commit
rb = rebase
st = status
br = branch
up = pull
Ok. All I need is the One True Editor (when not using magit) for git commit messages and my life is complete
edit ~/.gitconfig:
[core] editor = /Applications/Emacs.app/Contents/MacOS/Emacs -nw