I've always used ':1' for the beginning and ':$' for the end. To me, the benefit of this is that I always use the same mechanism to go to a particular line of a file. (I often do, say, ':45' if an error is reported at line 45.)
For moving up and down large distances, I also prefer ctrl+u for up and ctrl+d for down. There is a minor difference: ctrl+f will put the last line at the top of the screen, filling the rest with the tilde-abyss. That always bothers me.
If I want to select the entire contents of the file, hitting "v" then ":1" seems not to work.
This wisdom should be shared with everyone learning vi/vim, since this leads directly to the largest payoff.
Check out PreciseJump and EasyMotion:
http://www.vim.org/scripts/script.php?script_id=3437
http://www.vim.org/scripts/script.php?script_id=3526
(watch the animated gif demos on those pages and be amazed!)
MRU is really useful for navigating the most recently opened files:
http://www.vim.org/scripts/script.php?script_id=521
xptemplate is an awesome, very advanced snippet plugin:
http://www.vim.org/scripts/script.php?script_id=2611
NerdCommenter, for easy commenting/uncommenting blocks of code:
http://www.vim.org/scripts/script.php?script_id=1218
And, of course, before you install any plugin, you should do yourself a favor and install and use Pathogen, or something like it:
http://www.vim.org/scripts/script.php?script_id=2332
For me, these are some of the most essential plugins that I use every day. Some other good ones are tabular, renumber, stripansi, matchit, and surround.
But it seems that a lot of people new to vim get distracted by plugins, tweaking their config, et al, when they could be learning the "vi way" to get their actual code editing productivity.
I've never maintained my own .vimrc, or know what plugins I have installed or not, btw.
http://yanpritzker.com/2011/12/16/learn-to-speak-vim-verbs-n...
Example: :ma <-- sets a marker at the current cursor location named 'a'
later on, you can go back to this exact place by typing "a (that is quote followed by letter 'a' - the marker you named.
Note that you can have as many markers as you want.
I have been a vim power user for a little over 2 years now. I never bothered installing plugins and spent all my time instead learning ... the exact same commands described in the article. Now I type fast, I mean real fast.
A couple more tips I find useful:
- 'gg' and 'G' in command mode will send you to the beginning and the ending of the file.
- 'Ctrl-N' and 'Ctrl-P' in insert mode will auto-complete (suggestions only come from existing words in opened buffers, for more you'd probably need plugins).
All the other tips are _spot on_! I especially like the first one about moving vertically one line at a time. It takes some time getting used to, but the fact that you can repeat the 'jump' or jump back to your previous position. Believe me, you'll fly :)
My new set of advice for blazing fast typing:
1. Learn to touch type. The rest is meaningless without this.
2. Repeat 'vimtutor' religiously for 10-15 days.
3. Read this post and apply every tip until it's hard-written in your fingers' muscle memory.
4. ... voila!