Ad blocker interference detected!
Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers
Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.
This is an archive of the From Vim Help section on the Main Page for 2008 (started in February 2008).
- The gf command (goto file) opens the file under the cursor. :help gf
- You can control which characters are in the file name. :help 'isfname'
- And which directories are searched to look for the file. :help 'path'
- And what extensions are added to the file name. :help 'suffixesadd'
- 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 :#
- 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
- 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 `.
- 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-&
- 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
- You can have Vim try to detect whether to ignore case in searches. :help 'smartcase'
- Toggle an option by adding ! (set spell! will turn spell checking on/off). :help :set
- With set, use += to add option flags, or -= to remove them. :help add-option-flags
- :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'
- :set report=0 shows all "x lines changed" and "x substitutions" messages. :help 'report'
- :verbose set cindent? shows the option and where it was last set. :help :set-verbose
- :set shows all non-default options. :help :set
- You can use g/pattern/ to make a quickfix list. :help :caddexpr
- Each window can have a separate location list. :help location-list
- Use :cexpr to make a quickfix list from an expression. :help :cexpr