Vim Tips Wiki (original) (raw)

Welcome to the Vim Tips Wiki This wiki is about Vim, an open-source, powerful and configurable text editor. 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,649 articles. About this wiki New tips Policies and how to edit Discussions and asking questions Create a new tip #vim on Libera Chat (IRC)
Featured tip view archive Searching for files is made easier with the tab-completion of the :find command introduced in Vim 7.3. It is also straightforward to set up a short function to use external commands to populate your quickfix list with a set of files which you can navigate to, and there are plenty of plugins available for fuzzy matching and other advanced features. See our Featured tip for details!
Did you know? view archive The Vim FAQ is online. There are several methods to change the indentation of a block of lines. A mapping can change the Home key to move to the first character, or the first that is nonblank. Filtering and redirection can capture output from Vim or external programs. It's easy to change between backslash and forward slash in a file path. If you create your own tags file, you can jump to the correct line and column. If you work with many files, it's easy to save them all with :wa or :xa. Simple substitutes or a Perl script can convert text using HTML entities like >. The command :g/^/exe ".w ".line(".").".txt" saves each line in the buffer to a separate file. :g// lists all lines containing the last search pattern, and :redir will capture the results. With set browsedir=buffer the File, Open dialog defaults to the current file's directory.
From Vim Help view archive 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, ^= to add them at the beginning, or -= to remove them. :help add-option-flags, :help set-option
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): Access tips by tip id, for example tip 1 is VimTip1