Forum: DSL Tips and Tricks
started by: mikshaw
Posted by mikshaw on July 31 2005,15:00There is a huge repository of Vim tips and tricks at vim.org...so many that you need some serious free time to read through them.
Here are a few of my favorites so far:
:r <filename> -- Insert a file below the cursor
:r !<command> -- Insert the output of a command below the cursor
% -- Match the bracket under (or nearest one after) the cursor
* -- find all instances of the word under the cursor
# -- same as * in reverse
shift+click -- in gvim, same as * (right-click for reverse)
guu/gUU -- lowercase/uppercase line
gf -- open filename listed under cursor
ga -- display ascii, hex, and octal code of the character under cursor
ctrl+a/ctrl+x -- increment/decrement number under cursor
ctrl+n (while typing) -- word completion, cycles through words in current or included file(s)
:set verbose <option>? -- tells you where <option> was last set
Posted by benson on Aug. 07 2005,23:58how can i use color codes in vim? i mean putting an ESC character followed by this sign; [ then color code number.
Posted by clacker on Aug. 08 2005,13:50To embed an escape character, use <CTRL>v and then hit the escape key. Then use the code you want.
<CRTL>v <ESCAPE>[1m for bold
<CRTL>v <ESCAPE>[0m for normal