There is an online help mechanism in VIM. You should know how to use it.
Type
:help
and you will get a split window with help text in it. You can move around with the arrow keys, or with any of the VIM movement commands you will learn.You can always enter funky keys by pressing ^v first, and then the keystroke. This is most useful in help. You can type
:help ^v^t
to get help for the keystroke ^t. By convention you can usually get what you want by typing :help CTRL-T
also. Don't underestimate how handy this is.Most distributions of VIM will install a program called
vimtutor
. This program will teach you to use VIM. It will do so by using VIM. It is a handy piece of work (props to the author!).Help has links. If you see one you like, you can move the cursor to the link (lets not just beat on the arrow keys, here!) and press ^]. Yeah, it's an odd and arbitrary-looking command. That will not only navigate to the link, but also push it on a stack. If you want to go back, you can press ^t (yes, also pretty arbitrary) to pop the current link off the stack and return to the previous location in the help. The commands
^]
and ^t
aren't very memorable, but we'll use them for code navigation later, so learning them is not a total waste of mental energy.
No comments:
Post a Comment