Wikia

Vim Tips Wiki

Watchlist Recent changes
1,601pages on
this wiki

Home

Welcome to the Vim Tips wiki

This wiki is about the editor Vim. We aim to exchange tips and tricks with other Vim users. Please help by improving or adding comments to any tip.

If you are new to Vim, we have plenty of tips that will help you get started.

We are currently editing over 1,601 articles.

Featured tip for June view archive

Vim can work with all the major line-ending formats but sometimes does not load a file in the format you want. Usually this is because a different text editor saved a file with mixed line-ending styles. It can be very annoying to load a file in Vim, which reads in with a Unix file format, when only a few lines lack this carriage return. It is worse when you cannot modify it because of strict revision control.

Our featured tip automatically reloads such files using DOS format if any DOS-style line endings are found. This will automatically "correct" the file if you save it, so an enhanced version will also tell you how many line endings are in each style so you can decide for yourself which format to use on a save.

Did you know? view archive

From Vim Help view archive

  • :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'

Information

  • Search the tips
[] VimTip (7)
[+] Integration (5)
[+] Plugin (1)
[+] Usage (20)
  • Access tips by tip id, for example tip 1 is VimTip1

Around Wikia's network

Random Wiki