[lug] Little vim trick, editing multiple files
lists at danielwebb.us
Thu Dec 1 14:10:55 MST 2005
(continuing on my Vim tirade)
Also, it's worth the effort in the case of Vim to evaluate and learn add-on
packages and scripts relevant to the editing you're doing. In my case, I work
all day on a package of about 250 files with 50,000 lines of C code. The cscope
interface is a life-saver in this case. There are all kinds of obscure things
like the cscope-Vim interface that are definitely worth the time to research
and learn if you spend much of the day on an editor.
The other thing I highly recommend is to map the Caps-lock key to ESC, which
can be done several ways, but I have found the most reliable is to edit
/etc/X11/xkb/keycodes/xfree86 and swap the values for ESC and Caps-lock. I
never could get xmodmap solutions to work right. Ctrl and Alt are a pain.
Caps-lock is practically home-row, yet who uses Caps-lock? And if you do need
to capitalize a bunch of stuff, you can just do simple Vim commands like
"gUas" (capitalize all the letters in the current sentence) or "gU$"
(capitalize to the end of the current line).
I actually learned Vim because a nearby office-mate learned it and became an
absolute fanatic. There's a reason there are so many Vim fanatics!
More information about the LUG