Wikia

Vim Tips Wiki

From Vim Help/2008

Talk0
1,612pages on
this wiki

< From Vim Help

Revision as of 04:00, February 1, 2009 by JohnBeckett (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This is an archive of the From Vim Help section on the Main Page for 2008 (started in February 2008).

December 2008Edit

November 2008Edit

  • Use :set nu! to toggle the display of line numbers. :help 'number'
  • Use :-5,5l# to list lines near the current line. :help :list
  • :-5,5# does the same, without showing unprintable characters. :help :#

October 2008Edit

  • Use :match ErrorMsg /sample/ to highlight every "sample". :help :match
  • Or do the same with :call matchadd('ErrorMsg', 'sample') then :call clearmatches(). :help matchadd()
  • Use :hi ErrorMsg to see the ErrorMsg highlight definition. :help :highlight

September 2008Edit

  • The command :marks aB lists marks 'a' and 'B'. :help :marks
  • Press g`a to jump to mark 'a' without changing the jumplist. :help g`
  • Press `. to jump to the position of the last change in the current buffer. :help `.

August 2008Edit

  • You can modify part of the status line without creating an entire 'statusline' string, using 'rulerformat'. :help 'rulerformat'
  • The GUI menus in gvim can interfere with alt-key mappings. See :help 'winaltkeys' to fix this.
  • Use :set all& to set all options, except terminal options, to their default value. :help :set-&

July 2008Edit

  • In a script, <sfile> is replaced with the name of the sourced file or function. :help <sfile>
  • The path modifier :r gives the root of a file name (removes extension). :help ::r
  • In insert mode, press Ctrl-K = e (no spaces) to insert the euro sign €. :help digraphs

June 2008Edit

May 2008Edit

  • :verbose abbreviate lists each abbreviation and where it was defined. :help :abbreviate-verbose
  • Avoid an insert-mode abbreviation by pressing Ctrl-V (or Ctrl-Q if you use Ctrl-V for paste) before the character after the abbreviation. :help abbreviations
  • Setting the 'display' option to include "lastline" will show as much of the final (wrapped) line as will fit on the screen. :help 'display'

April 2008Edit

March 2008Edit

February 2008Edit

Around Wikia's network

Random Wiki