Vim Tips Wiki
(July archive)
(archive August)
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]].
  +
  +
==August 2009==
  +
*The command <tt>:ka</tt> (useful in a script) sets mark '''a'''. {{help|:k}}
  +
*Using <tt>g`"</tt> jumps to the last known position in a file without changing the jump list. {{help|g`}}
  +
*Typing <tt>:keepmarks '<,'>!filter</tt> replaces the last selected lines with output from a filter, while keeping marks. {{help|:keepmarks}}
   
 
==July 2009==
 
==July 2009==

Revision as of 05:01, 1 September 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.

August 2009

  • The command :ka (useful in a script) sets mark a. :help :k
  • Using g`" jumps to the last known position in a file without changing the jump list. :help g`
  • Typing :keepmarks '<,'>!filter replaces the last selected lines with output from a filter, while keeping marks. :help :keepmarks

July 2009

June 2009

  • Press Ctrl-w then o to see only the current window. :help CTRL-W_o
  • Press Ctrl-w then r to rotate windows in a row or column. :help CTRL-W_r
  • Press Ctrl-w then K to move the current window to the top (full width). :help CTRL-W_K

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

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

January 2009

Previous years