JohnBeckett (talk | contribs) (Archive April) |
JohnBeckett (talk | contribs) (archive May) |
||
Line 4: | Line 4: | ||
To discuss suggestions for new items, please edit the [[Talk:From Vim Help|talk page]]. |
To discuss suggestions for new items, please edit the [[Talk:From Vim Help|talk page]]. |
||
+ | |||
+ | ==May 2009== |
||
+ | *In a range, <tt>.</tt> is the current line, and <tt>.+5</tt> is 5 lines after the current line. {{help|:range}} |
||
+ | *Typing <tt>6</tt> then <tt>:s/old/new/g</tt> is interpreted as <tt>:.,.+5s/old/new/g</tt> {{help|N:}} |
||
+ | *Command <tt>:silent 'a,'bs/old/new/g</tt> will substitute in a range, swapping the first and last lines if necessary. {{help|E493}} |
||
==April 2009== |
==April 2009== |
Revision as of 08:55, 1 June 2009
This is an archive of the From Vim Help section on the Main Page
Every few weeks, the section on the Main Page will be replaced. Old items will be moved here so anyone interested can browse them.
To discuss suggestions for new items, please edit the talk page.
May 2009
- In a range, . is the current line, and .+5 is 5 lines after the current line. :help :range
- Typing 6 then :s/old/new/g is interpreted as :.,.+5s/old/new/g :help N:
- Command :silent 'a,'bs/old/new/g will substitute in a range, swapping the first and last lines if necessary. :help E493
April 2009
- Use :set rl! to overcome boredom. :help 'rl'
- Or try :g/^/m0 :help :g :help :m
- And ggg?G can be just as useful. :help g?
March 2009
- Press R to enter Replace mode to overstrike characters. :help R
- Press gR to enter Virtual Replace mode to overstrike screen space. :help gR
- Press 3S to delete 3 lines and start insert (substitute lines). :help S
February 2009
- Read how to recover after a crash, before you need to! :help crash-recovery
- The 'backupcopy' option determines how files are written if backups are used. :help 'backupcopy'
- The 'backupext' option can be changed in an autocommand to keep lots of backups. :help 'backupext'
January 2009
- The :le command left-aligns all visually-selected lines. :help :left
- Format specified lines by typing gq followed by a motion command. :help gq
- gq uses 'formatexpr' or 'formatprg' or 'formatoptions'. :help 'formatexpr' :help 'formatprg' :help 'formatoptions'
2008
The 2008 From Vim Help is archived here.