Vim is a highly configurable text editor built to enable efficient text editing. It is an improved version of the vi editor.

learn more… | top users | synonyms

7
votes
6answers
3k views

Is there a Vim-like word processor?

I've realized that Vim makes some basic tasks very efficient (cutting, deleting, pasting...) I would love to have those features in a word processor. Does anyone know one (I prefer open source).
2
votes
1answer
4k views

How do I set up neocomplcache?

I just started using vim and saw a cool plugin: neocomplcache. My problem is that I can't get it to work properly. After installing, I took the example config from the help files of neocomplcache and ...
0
votes
0answers
18 views

Vim-SyntaxHighlight: Custom Syntax Highlighting With Vim

I'm trying to make my own syntax highlighting for vim. I was following the instructions in here (first answer) but I need to set a group for import and pack, and another group for func, lib, group. ...
29
votes
4answers
14k views

How to setup a line length marker in vim/gvim?

Some GUI text editors have a vertical line which serves as line length marker (it helps keeping lines shorter than 80 chars in source code files). Is is possible to have something similar in ...
0
votes
1answer
34 views

Map escape key to :q in vim in normal mode

I use vim as a viewer in midnight commandder and I want to quickly view and close a file. How can I map the escape key to :q in normal mode so that vim exits only if nothing is changed?
1
vote
0answers
31 views

Issues with GVim and permissions on Win7

I've installed GVim on my win7 machine but I'm having trouble with saving any files. I keep getting the e212: Can't open file for writing If I try to just quit with :q!, I get e138: Can't write ...
0
votes
1answer
17 views

Vim map key combination of Control and Dash

Is it possible to bind <C--> (or <C-dash> or <C-minus>, I actually do not know) in vim to something, like <C-W><C-Q>? What does it mean <C--> in the default ...
19
votes
3answers
4k views

Using the vim split command from the command line to get 4 quarter splits

I want to open four vim files on the command line: vim file1 file2 file3 But I would like each file to be opened in a separate split: vim -c "split file1" -c "split file2" -c "split file3" file4 ...
0
votes
1answer
16 views

vim spellcheck: command or function to dump all bad words to file

I frequently need to correct files that have numerous spelling errors. Spellcheck tags all these words, but is there a command or function within vim that will dump all these tagged words to a file?
7
votes
4answers
2k views

Go to middle of line in vim

I know 0 goes to the beginning of line and $ goes to the end, but is there something for the middle?
2
votes
3answers
846 views

Delete last word (Ctrl-W): Make bash shell behave like vim command line

Among the many useful keyboard shortcuts available in the bash shell, there is Ctrl-W to delete the word to the left of the cursor. Let's suppose my command line looks like the following: cp ...
2
votes
0answers
117 views

Mouse click only works once with iterm2/tmux/mosh

I'm trying to set up iTerm2 + mosh + tmux to do my remote work. I can get everything to connect up, but for some reason, the mouse response is funky. If I split my tmux window so I have two panes and ...
5
votes
8answers
7k views

Vim: How to Install Airline?

I'm just getting started with Vim. It's a fun experience, but I've found it to be kind of overwhelming. I'm trying to get this plugin installed, vim-airline, but I'm having a lot of trouble. The ...
2
votes
3answers
525 views

VIM Windows random flicker

I'm using Windows XP with VIM 7.2, so far I've tried a bunch of different 7.2.x patch level versions (the official 7.2, and newer patched distributions from the 'Cream' project, without Cream, of ...
1
vote
3answers
212 views

VIM/Screen background color is inverted for non-text characters

I'm trying to use a vim while inside a screen session. For some reason, the background color for the parts of the screen without text are displaying as dark while the parts with text are displaying as ...
2
votes
2answers
179 views

Vim not colouring the end of lines when run inside screen

When vim is started inside of gnu screen it does not colour the background after text. Screen looks like it should be setup for handling 256 colours correctly: $ screen $ tput colors 256 $ echo ...
2
votes
1answer
29 views

How to make vim truly reopen a file as a cpp file?

I have a file filename.fs with C-like syntax content. Vim opens it as a Forth source, and I use :set syntax=cpp to get the correct highlighting. But later when I try to jump between words I encounter ...
0
votes
1answer
76 views

Can I get vim to install bundles and close in the background?

I've been playing around with Dockerfiles, and in setting up a development environment, there is one manual step I haven't been able to work around yet. To install the bundles in my vimrc, I have to ...
10
votes
9answers
3k views

Emacs equivalent to VIM ci"?

Does emacs have the equivalent of VIMs ci" command? Basically I want to replace the text inside a set of quotation marks. In vim I can ci) or ci] or ci} to "change inner *"...
0
votes
1answer
17 views

Stop Vim from automatically tw=78 line-break wrapping text files

I recently updated Vim, and noticed that whenever I open a .txt file, the option tw=78 is set. (Which makes Vim automatically break lines when they would have exceeded 78 characters.) I don't like ...
3
votes
4answers
2k views

How can I copy into the Mac clipboard from vim?

I can paste from vim in one terminal window to vim in another, but not to anything outside vim. I've read numerous posts on the subject, and nothing I've found has helped. Copy/pasting from MacVim ...
4
votes
5answers
4k views

Always use :set paste, Is it a good idea?

In a terminal vim, pasting clipboard data often messes up the code indent. I just knew if I uses :set paste the indent is not broken. Though, after pasting data, should I do :set nopaste again? What ...
1
vote
1answer
34 views

Vim - automatically delete SWP file after recovery doesn't change the original file

When the Vim process is abruptly terminated (e.g. system crash), it leaves a SWP file. Opening the original file in Vim later gives the option of recovery. Most of the time the recovered file is the ...
0
votes
1answer
23 views

vim regex :s/^\s*\(.\)\+/\\\1/g only shows last character substituted

I need to prepend a backslash \ to each character in a string, excluding any leading whitespace. I believed the following would do the trick. :s/^\s*\(.\)\+/\\\1/g but it produces this result for ...
7
votes
5answers
2k views

How do I keep vim from highlighting matches after a replace?

I have set hlsearch in my ~/.vimrc. This is normally very useful, but it's annoying to have to do :noh after I do a replace like '<,'>s/$/',/ (which highlights the end of every line after I run ...
0
votes
1answer
30 views

How to manage multiple configuration for vim?

I am currently working with multiple projects which have different vim setting required. Is there a way to open vim with specific configuration file ?
0
votes
3answers
169 views

Why is the cursor flashing at the end of the line in gvim?

I recently started using vim/gvim and I have this really annoying problem where cursors flashes at the end of the line with every character I type in insert mode. Take a look at this video and you'll ...
2
votes
1answer
23 views

How to get back to normal mode when using vim keybindings in Firefox code/style editor?

I'm trying to use vim keybindings for the code/style editor in Firefox Developer Edition. I can type "i" to get into insert mode, but how can I get back to normal mode? The escape key toggles the ...
0
votes
1answer
20 views

How do I fold my .vimrc non-temporarily using vim code-folding? (sp13-vim)

I'm using spf13-vim, and I wanted to keep my vimrc folded into sections like this +------126 lines: Environment ...
0
votes
1answer
55 views

Vim tabs with screen?

When I use tabs in vim, I use the shortcut ctrl+pgup and ctrl+pgdn for navigating between tabs. I realize I can do :tabnext and :tabprev, but that is certainly more keystrokes. Everything works fine ...
4
votes
3answers
547 views

Replace a regular expression within vim with an output produced by a console command with the expression as its argument?

let's say I have a file with the following content: This is a _file_ which has some _special_ keywords, that I would _like_ to replace. I can do a search and replace of the speical keywords ...
2
votes
2answers
3k views

How to underline a word in Vim?

I want to underline a word in Vim. How can I do this? After closing the file and reopening it that word should still be underlined.
5
votes
1answer
3k views

How do I change or edit Vim Homebrew recipe?

I use a Vim plugin that requires +clientserver, and the default brew Vim recipe does not include the appropriate flags, so I'm trying to add it to the ./configure step. I tried building Vim from ...
0
votes
1answer
43 views

How to preserve tabs in Vim when you paste something? [duplicate]

When I paste any code into Vim, I the following happens. How could I tell Vim not to screw up my tabs?
0
votes
1answer
33 views

Unable to delete .swp file

I'm using Vim on Windows 7 Enterprise. Vim sometimes creates an .swp file. After closing Vim, this file sticks around. I would like to delete it. However, I receive the following error: ri : Cannot ...
0
votes
1answer
30 views

Can vim highlight current matching words when I input replace command?

Can vim(or by some plugin) highlight current matching words when I input replace command? For example, given following document: attribute_list = [ ("attribute_1", int), ("attribute_2", ...
0
votes
2answers
102 views

Can I insert .jpeg and .gif images in my Vim files?

Well I am new in Vim. So learning while working using Vim. I am currently learning Kivy (A Python framework) and taking some notes using Vim. However sometimes I need to save pictures (like .jpeg, ...
0
votes
1answer
34 views

Why is vim inserting the contents of ". after I leave insert mode

vim is doing something that I can't quite figure out. When I leave insert mode, and navigate with j/k/h/l within a second of doing so, vim appends the contents of the ". buffer. On a tip from How to ...
0
votes
1answer
21 views

“Git commit” takes a very long time (> 40 seconds) to open vim. What could be happening?

When I run git commit -m 'some commit message', everything works as expected. When I run vim on its own, everything works as expected. Yet when I run git commit, which launches vim, it takes up to 40 ...
0
votes
0answers
35 views

Vim boilerplate (automatic, file specific) [duplicate]

There is a bit of code that I want to include in a variety of files done with vim, and I don't feel like copy-pasting every time. The example that I want to accomplish the most is vim newfile.tex ...
10
votes
3answers
678 views

How to break long lines in vim?

I have a quite big text file formed of blocks like Short line. Really long line. Short line. separated by empty lines, and I would like to use vim (on Linux) to break down the long lines and obtain ...
0
votes
0answers
32 views

How can I use VIM with remote files?

I've tried googling but all I find are terrible tutorials that end up not being compatible with VIM that are out dated or require me to manually upload every single time instead of letting me work on ...
3
votes
1answer
1k views

Is there a Vim 7.3 or 7.4 package available somewhere for CentOS 6.5

I'm running CentOS 6.5 and the only Vim packages available from yum are for Vim 7.2, even though Vim 7.4 is now out. A lot of the Vim plugins I typically use are only compatible with Vim 7.3 and ...
4
votes
2answers
146 views

How can I get Syntastic to recognize newer Ruby syntax?

I'm using Syntastic in Vim, and it highlights newer Ruby syntax as errors. For example, if I use required keyword arguments (introduced in Ruby 2.1), like this: def distance(from:, to:) # whatever ...
0
votes
1answer
63 views

How to point MacVim to the right perl on OSX 10.10?

When I try to use MacVim from the command line, I get dyld: Library not loaded: /System/Library/Perl/5.12/darwin-thread-multi-2level/CORE/libperl.dylib Referenced from: ...
8
votes
1answer
2k views

Automatically close NERDtree when opening file

I have installed NERDtree 4.1.0. I have mapped <leader>n to :NERDTreeToggle<CR>. I would like to use this in a way where I can press <leader>n, then locate the deisred file in the ...
1
vote
2answers
857 views

How to disable scroll wheel in Vim

I am using Vim 7.3.829 on Windows 7, how can I disable the scroll wheel completely in the settings of Vim?
2
votes
2answers
42 views

How can I get a list of all misspelled words in a text using Linux?

I have a text that has a number of misspelled words. I'd like to get a list of all those words, so for a text like this: This is just a normall line with some speling mistakes in it. It would ...
1
vote
1answer
26 views

Is there a clean way to quit evim?

While fiddling with installation of vim and gvim from source, trying to release console-based vim from X dependencies, I tried to run evim to see what it is and whether it should be freed from X ...
2
votes
4answers
173 views

Programming in Windows 8

I am a semi-experienced Linux user and I write my software explicitly from command line. If I need a compiler, I simply sudo-apt-get it, if I need to run a code I just execute it from command line and ...