====== Useful VI Tricks ====== Put this in your .vimrc: map :s.^//.. :noh map :s.^.//. :noh Now you use a visual line select (''shift-V'') to select what you want to comment, smack ''F5'' and it's done. ''F6'' uncomments. As a bonus, use these to change indents. Change indent to your preference for indenting. I use 4 spaces. Use ''\t'' if you want a tab. Combined with ''shift-V'', you can move whole blocks left and right easily. map :s/^indent// :noh gv map :s/^/indent/ :noh gv