Monday, May 29, 2006

useful shortcuts

Something I use often in command mode.

:q

close current file. closes vim is last file.

'"
move to last stored position in edited file

g<Ctrl-]>
list all symbols found in tags

<Ctrl-]>
go to first symbol found in tags. :tnext/:tprev/:tlast to browse all matching tags

*
find next occurence of symbol under cursor

#
find previous occurence of symbol under cursor

%
find matching opening/closing bracket

gf
"go file" - open file with name of word under cursor

x
delete characted under cursor. Unlike <Delete> works on all terminals.

dd
delete current line

G
go to the end of file

gg
go to the beginning of file


Command mode with its simple shortcuts was saving my ass on numerous occasions. Broken terminals are still around. Even if another day all borken terminals get fixed, tools like busybox working over raw serial line will be with us for quite some time ;-)

1 comment:

Murali said...

Thanks for the 'gf', it was something I badly needed. A big time saver compared to :next 'filename' ;) ;).

Thanks a lot for that and keep the good work

Murali.