Wikia

Wikia Navigation

Start a wiki
Connect Log in Sign up

Vim Tips Wiki

Navigation

Watchlist Recent changes
[image]
35 Talk
1,601pages on
this wiki

Home

View source [image]

Redirected from Main Page

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 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

Vim homepage wishlist I'm considering spending some work on the Vim homepage. Which features are you missing most? Let's collect thoughts about how the Vim homepage can be improved @: will repeat a colon (Ex) command (and @@ will repeat again). You can use :g/^\s*$/;//-1sort to sort each block of lines in a file. It's useful to map . .`[ to repeat the last command and put the cursor at start of change. You can open a web browser with the URL in the current line. With --remote-send you can close a Vim you left open remotely. If you're used to Perl regex, you can use Perl compatible regular expressions. In insert mode, Ctrl-Y inserts the character above. You can make it insert the word above. A user-defined command can evaluate :Calc sin(pi/2). It's sometimes better to not use the slash delimiter for :s/old/new/. You can drag & drop one or more files into gvim.

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

Vim documentation Links to guides, books, tutorials, and information on other sites Vim scripts Recent changes and descriptions of featured scripts Vim news News from this wiki and vim.org How to report spam Imported tips and their authors Using Vim to edit tips
Search the tips
Browse the tips alphabetically or by category (click + to expand; requires JavaScript):
[−] VimTip (7)
[+] Integration (5)
[+] Plugin (1)
[+] Usage (20)
Access tips by tip id, for example tip 1 is VimTip1

Languages:

Around Wikia's network

Random Wiki

Wikia Inc Navigation


You are viewing a mobilized version of this site...
View original page here

Mobilized by Mowser Mowser