Here’s my set-up. For “help”, most of the time apropos is what I need to do. Yes… I waste time mousing over to the drop down menu. The other twenty percent of the time, I want to know what a key is doing. Those two functions are going over to F1 and shift-F1 respectively. I’m not setting anything onto alt-F1 or super-duper-F1 because I’m not liable to remember more than two functions per function key.
The most important tool for the lazy roll-tester: comment and uncomment region go to F2 and shift-F2. (I’m sticking it next to F1 because I definitely “need help” if I’m using it a lot!)
F3 fires up the shell, because it’s the first thing I do most of the time anyway.
F4… “close” the current buffer. I sometimes use “kill other windows” (now shift-F4), but usually I forget what it does exactly and kill the wrong thing.
F5 is now the one stop keyboard macro stop. The usual scenario is… edit some code, start recording, save the file, change to the shell buffer, type the shell command to run the code I’m working on, then stop recording. Now F5 works like all those other IDE’s out there, except I get to keep my entire command and output history and I’m just one C-x b away from getting back to my code. Viva roll testing!
F6 switches to the “other” window. Yes. I still confuse C-x o and C-x 0. Maybe I’ll have more windows open if I have this, but I usually like just having one giant buffer, so I doubt I’ll use this.
F8 to run my emacs code I’m fiddling with– and shift-f8 to load a whole file. Yes… my left hand hurts from doing C-x C-e too many times today. (F8 was the next most often used key after F5 in one of my old IDE’s, so maybe I’ll think of something better, but I want something that will encourage me to fiddle with Emacs a little more often.)
Finally… what’s not listed here is what illustrates what an Emacs loser I am! (I’m still addicted to Tortoise SVN. Sad, but true.) Yes… those lists of things that “if you don’t know how to do these things with your editor, then you stink” are NOT yet represented here. Maybe some day…. For now… just preface your comment with, “I can’t believe you didn’t make a hotkey for ___! You are obviously an emacs loser n00b!”
(global-set-key [f1] 'apropos-command) (global-set-key [S-f1] 'describe-key) (global-set-key [f2] 'comment-region) (global-set-key [S-f2] 'uncomment-region) (global-set-key [f3] 'shell) (global-set-key [f4] 'kill-this-buffer) (global-set-key [S-f4] 'delete-other-windows) (global-set-key [f5] 'call-last-kbd-macro) (global-set-key [S-f5] 'start-kbd-macro) (global-set-key [M-f5] 'end-kbd-macro) (global-set-key [f6] 'other-window) (global-set-key [f8] 'eval-last-sexp) (global-set-key [S-f8] 'load-file)