Top "Vim" questions

Vim is a free and open-source modal text editor available for most major platforms.

Searching word in vim?

I can search word in vim with /word. How can I search only for word, excluding searches for word1 and …

vim
vim line numbers - how to have them on by default?

I can :set number from within a file I'm editing but how can I have them always be on by …

vim vi editing line-numbers
set gvim font in .vimrc file

I am using gVim 7.2 on Windows 7. I can set the gui font as Consolas 10 (font size) from the menu. I …

windows vim
How can I autoformat/indent C code in vim?

When I copy code from another file, the formatting is messed up, like this: fun() { for(...) { for(...) { if(...) { } } } } How can …

c vim code-formatting
How to stop line breaking in vim

I like that the long lines are displayed over more than one terminal line; I don’t like that vim …

vim
Vim: insert the same characters across multiple lines

Sometimes I want to edit a certain visual block of text across multiple lines. For example, I would take a …

vim
How to go back (ctrl+z) in vi/vim

In normal text editors [with all due respect to Vim] there is a shortcut Ctrl+Z when you have done …

vim vi back undo undo-redo
How to run mvim (MacVim) from Terminal?

I have MacVim installed and I am trying to set it up as the editor for Git (version control), but …

macos shell vim command-line macvim
Using Vim's tabs like buffers

I have looked at the ability to use tabs in Vim (with :tabe, :tabnew, etc.) as a replacement for my …

vim editor tabs
Vim for Windows - What do I type to save and exit from a file?

Using Windows XP I accidentally typed git commit -a instead of git commit -am "My commit message", and now I'm …

git vim windows-xp git-commit