Questions tagged [vim]

Vim is a free and open-source modal text editor available for most major platforms. It allows high efficiency in many text editing tasks but has a steep learning curve. To learn the basics, run ":help vimtutor". For non-programming questions please use https://vi.stackexchange.com/ instead.

Vim is a free and open source text editor with a steep learning curve that leads to high efficiency in many tasks related to text editing. If you wish to start with Vim, run :help vimtutor in Vim or run the vimtutor command in shell, which will teach you basic commands.

Vim is a highly configurable text editor built to enable efficient text editing. It is an improved version of the vi editor distributed with most UNIX systems and is available on a large number of other systems including Win32, MS-DOS, OS X, AMIGA, OS/2, Cygwin and many more. Vim is written by Bram Moolenaar.

Vim is often called a "programmer's editor," and is so useful for programming that many consider it an entire IDE. It's not just for programmers, though. Vim is perfect for all kinds of text editing, from composing email to editing configuration files.

Before you ask

  • If your question is not about programming, consider posting Vim related questions at the dedicated Vim Stack Exchange site.
  • Vim has an extensive help system that will often address your questions. Type :help <subject> within Vim to search for help on a particular subject; for instance: :help search. The help documentation is also available online.
  • Search Stack Overflow for similar or duplicate questions.

Free Vim books

Vim books

Documentation

Tutorial

See also

License/charityware

Vim is Charityware. You can use and copy it as much as you like, but you are encouraged to make a donation for needy children in Uganda. Please see |kcc| below or visit the ICCF web site, available at these URLs:

Related tags

27998 questions
25
votes
4 answers

How to search in the Vim mapping listing?

Using :map provides a list of all mappings in Vim. But, I am unable to search through the list. I am surprised to see it being opened in a different type of window unlike usual Vim help files. Is there a way to have it available in the usual form?
Jikku Jose
  • 18,306
  • 11
  • 41
  • 61
25
votes
5 answers

Vim: how to make the text I've just typed uppercase?

Use case: I've just entered insert mode, and typed some text. Now I want to make it uppercase. It can be done via gUmotion. However, I can't find the motion over the text entered in the recent input session. It's somewhat strange and the concept…
P Shved
  • 96,026
  • 17
  • 121
  • 165
25
votes
3 answers

How to correctly set the spellfile in VIM?

I'm trying to use spellchecker in vim; if I want to add a word to the internal dictionary (so that it is not highlighted as wrong) by the zg command, it says "option spellfile is not set". I tried to type :set spellfile=PATH.../.vim.spell, but I…
Peter Franek
  • 577
  • 3
  • 8
  • 25
25
votes
3 answers

How to get the active tmux window's name?

I want to write a script that gets the active tmux window's name and uses it as a variable for my vim session. Is this possible? I looked through the tmux manual and didn't see anything.
Jon Trainor
  • 251
  • 3
  • 3
25
votes
10 answers

redirection and vim

I was wondering if there's a way to see the output of any command, straight inside vim, rather than first redirecting it into a file and then opening that file. E.x. I need something like $ gvim < diff -r dir1/ dir2/ This gives ambiguous redirect…
Aman Jain
25
votes
2 answers

vim omnicomplete vs. vim intellisense

Are Vim OmniComplete and Vim Intellisense mutually exclusive or complementary? I'm a bit confused by conflicting terminology and implementations, such as these C++ OmniComplete and C++ Intellisence plugins.
Robert S. Barnes
  • 39,711
  • 30
  • 131
  • 179
25
votes
5 answers

How to delete bookmarks in NERDTree (Vim)?

I checked the documentation but couldn't find it. Does anybody knows?
alexchenco
  • 53,565
  • 76
  • 241
  • 413
25
votes
5 answers

In vim, how do I paste a column of text to the end of irregular length lines?

I would like to paste a column of text at the end of irregular-length lines. For example, I would like to paste the following: SRR447882.fastq.gz SRR447883.fastq.gz SRR447944.fastq.gz at the end of these lines: TIL01_ TIL01_ TIL04-TIP285_ Many…
Christopher Bottoms
  • 11,218
  • 8
  • 50
  • 99
25
votes
7 answers

VIM: FuzzyFinder usage, tips, gotchas - how can one make use of this plugin?

http://www.vim.org/scripts/script.php?script_id=1984 You can launch FuzzyFinder by following commands: Command Mode ~ |:FufBuffer| - Buffer mode (|fuf-buffer-mode|) |:FufFile| - File mode (|fuf-file-mode|) …
meder omuraliev
  • 183,342
  • 71
  • 393
  • 434
25
votes
3 answers

Vim:Fugitive:Glog - How to get commits for current file rather than revisions

Currently, if I type :Glog I get the list of revisions for the current file. If I type :Glog -- I get the list of commits for all files. What do I need to type to get the of commits for the current file?
Kyle Heironimus
  • 7,741
  • 7
  • 39
  • 51
25
votes
2 answers

VIM: how to append yanked text to unnamed register

I know "Ayy can append current line to register a. How do I append current line to unnamed register?
xiaochen
  • 1,283
  • 2
  • 13
  • 30
25
votes
1 answer

Use ag in ctrlp + vim

I want to use ag (silver searcher) with ctrlp and vim. I have this in my .vimrc: if executable("ag") set grepprg=ag\ --nogroup\ --nocolor let g:ctrlp_user_command = 'ag %s -l --nocolor -g ""' endif let g:ctrlp_show_hidden = 1 set…
Richard
  • 3,839
  • 5
  • 28
  • 34
25
votes
2 answers

Does Vim load plugins after loading vimrc?

I'm trying to override the highlight set in a plugin. The plugin does this: highlight! link WordUnderTheCursor Underlined Firstly, I'm not aware that ! added to highlight does anything. But that's irrelevant. Doing stuff like this in the…
Steven Lu
  • 41,389
  • 58
  • 210
  • 364
25
votes
6 answers

ViM: minibufexpl versus bufexplorer plugins

I am thinking of installing a buffer explorer for vim. Both minibufexpl and bufexplorer have very good rating. Can anyone explain the differences or the pros and cons between them. Or is only a matter of taste? Thanks!
Jogusa
  • 5,530
  • 5
  • 24
  • 23
25
votes
3 answers

Shortcut for switching back to last window in Vim?

Ctrlw1w switches to the first window. If currently I frequently edit in two of several windows, a shortcut for switching back to the last active window would be perfect. Is there such a shortcut?
user861746
  • 541
  • 2
  • 9
  • 14