Shortcut Keys
June 13, 2009
Note to self: these shortcut keys are useful. Practice using them.
mac
I set the dock to hide itself. I set the number of spaces to two, so that I am never searching for a window. If I don’t see it, it’s in the other space. Also, both arrow keys take me to the other space, so I don’t need to remember where I am. Also just learned about pbcopy and pbpaste.
cmd-del move selection to trash cmd-rarrow move between spaces (click and hold on window to carry it with you) cmd-larrow move between spaces cmd-E eject cmd-W close window cmd-Q quit app cmd-+ adjust magnification cmd-- F11 expose (at least that's where I want it) cmd-M minimize window cmd-TAB change app
emacs
Don’t exit emacs to prowl the filesystem or run a command. Wasteful.
M-! execute external cmd M-x shell shell buffer C-c C-c send C-c (shell mode) C-c C-d send C-d (shell mode) C-c C-z send C-z (shell mode) C-x C-b display buffer list M-x sort-lines M-x reverse-region ^ visit parent directory (dired) d mark for delete (dired) i display contents of subdir at bottom of same buffer (dired) o open file in different window (C-o doesn't change focus) m mark (dired) u unmark (dired) x expunge files marked for delete (dired) # mark auto-save files for deletion (dired) ~ mark emacs backup files for deletion (dired) D delete marked files (dired) R rename marked files (multiple files are moved into dir) C copy marked files + make a subdir (dired) $ hide subdir (dired) M-$ hide all subdirs (dired) M-x find-name-dired M-x find-grep-dired M-x find-grep M-x wdired-change-to-wdired-mode rename and move files by editing the dired buffer
ssh, screen
Remember to ssh user@host instead of ssh host followed by su user. Use ssh -X to launch X windows, and then emacs can be in its own window. Also, you pay for that up front laziness: how to set up ssh keys.
Basic screen procedure: run screen, run the comand, then detach with C-a d. Reattach with screen -r. If multiple screen sesssions, specify pid and terminal. Screen is unkind to emacs users because of the C-a binding but that is all you need. Stop using nohup.
firefox
installed “It’s All Text!” and reinstalled Firebug and YSlow. For the record the other addons I find useful: Live HTTP Headers, Web Developer, google and del.icio.us toobars.
websites
got a github account. Pastie at gist.github.com
also look into
- running svn commands from within emacs
- keep some standard dot files .bashrc .irbrc .emacs at github
- install these emacs files
- color highlighting in emacs not working on linux