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

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
12 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. ...
28
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
15 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
20 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 ...
2
votes
1answer
382 views

Clicking far away in vim in tmux in urxvt

I use vim inside tmux inside urxvt, and the mouse works perfectly well for clicking and selecting text, except when I want to click too far to the right. It seems to be related to the distance in ...
0
votes
1answer
7 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
3k 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?
0
votes
0answers
5 views

Sublime text 3 VIM switching to command mode when i'm swithcing keyboard language

I have sublimeText3 on two machines, both on ubuntu. The issue appears sometime ago on my laptop, i have no idea what was the reason
2
votes
3answers
810 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
79 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
524 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
206 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
167 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
26 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
52 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 ...
0
votes
0answers
21 views

VIM like modes inside browser text field [closed]

Looking for a browser plugin that will add vim like editing to text boxes like the one I'm currently typing to you in. Safari, Firefox or chrome are all options for me. Thanks!
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
12 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 ...
4
votes
3answers
4k views

Vim Solarized dark theme looks weird on iTerm2

I just installed the solarized colorscheme following instructions on the project's page. This is what it looks like now: which is not like those screenshots on the official page. Any idea how to ...
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 ...
2
votes
1answer
21 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
22 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
3k 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
24 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
160 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
22 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
17 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
54 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 ...
3
votes
3answers
518 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
40 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?
1
vote
2answers
2k views

My vim plugins are not loading

I am on a Mac. I want to install vim plugins. The problem like always is that after following exactly the instructions on https://github.com/tpope/vim-pathogen the plugin fugitive will not load. I ...
0
votes
1answer
30 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
28 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", ...
7
votes
2answers
2k views

Can I get the Vim Ctrlp plugin to ignore a specific folder in one project?

The Vim Ctrlp plugin has a way to globally ignore certain folder names. Eg: let g:ctrlp_custom_ignore = '\v[\/]\.(git|hg|svn)$' However, I have an ignore rule that's specific to one project. I ...
0
votes
2answers
81 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
31 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
3answers
2k views

“.ssh/config” E212: Can not open file for writing

I'm new to linux. I downloaded an image of ubuntu 12 for VirtualBox and I want to configure the .ssh/config file to access via ssh to an application in development. I access /home/ubuntu folder and I ...
0
votes
1answer
20 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
622 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
31 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
106 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 ...