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

0
votes
1answer
237 views

Change pythonpath in Vim

I'm using Vim for Python coding. The problem is, that I'm writing in Python 3 and Vim settings contain only Python 2.7 paths. That does not allow me to use plugins (like python-mode) for autocomletion ...
1
vote
1answer
640 views

How to install Ultisnips with Snippets on Linux?

I'm using Slackware and trying to install and use Ultisnips. I use Pathogen and the documentation says the following: > Using Pathogen: UltiSnips-using-pathogen If you are a pathogen user, ...
2
votes
2answers
53 views

Don't load undo file if it's too large in Vim 7.3+

I just copied a massive amount of text (on the order of millions of lines, I think) into a Vim register, opened a new file, pasted, and then proceeded to edit the new copy of the excerpt. Vim was ...
0
votes
1answer
88 views

How do I get vim to stop complaining about missing colors?

Vim's colors look good and everything seems to work fine, but at start up I consistantly get this error: Error detected while processing function ...
2
votes
1answer
236 views

build vim 64bit on windows 7

i am trying to build 64bit vim on win7 64bit with visual studio 2008. My python34 is 64bit version. Below is what i did. hg to get the vim source. set VCDIR="C:\Program Files (x86)\Microsoft Visual ...
1
vote
1answer
45 views

How to properly remap `<del>` to `<esc>` in vim?

I'm a happy owner of a TypeMatrix 2030, as well as a happy vim user. On this keyboard the <del> have a central place, while the <esc> is the top-left key as usual. So I would like to remap ...
0
votes
1answer
884 views

Can't get vundle or neobundle to work on GVim on Windows 7 64bit

Can't get these add-ons (vundle or neobundle) to work on my Windows 7 machine. Everytime I try to install plugins I'm getting the following error messages: Error detected while processing function ...
0
votes
1answer
30 views

How to move around a long line in vim

I am currently checking a file with extremely long line, take around 100 screen line to show. When I use page down, it just run directly to next line, how should I page down a screen page?
1
vote
1answer
64 views

vim autocomplete search from middle of word

Are there any plugins that provide middle of word auto complete in Edit mode? Currently Ctrl+N and Ctrl+P will only work if you type the start of the word. I would like to type: if (cool and get ...
1
vote
2answers
155 views

How can I validate my .vimrc?

My .vimrc files seems to work, and doesn't generate any visible errors during normal operation. I recently started using Knife, and found that I cannot use Vim as my editor for editing Chef content ...
0
votes
1answer
46 views

How do I keep the window centered on a particular line number while switching files in vim?

I need to quickly compare different versions of a file and need to constantly change to a new file. Is it possible to fix the cursor on a particular line number while I cycle through different files? ...
0
votes
1answer
34 views

Open vim to a specific line with a variable

I'm trying to do the following: vim +$line $LEDGER But instead of opening at the line number it's opening two files, one the number and the other the actual file I want to open.
1
vote
1answer
54 views

VIM - How to search and replace multiple strings using leader?

I'd like to make a leader shortcut for doing multiple global search and replaces in the current buffer. For example, pressing leader then "fq", I'd like it to search and replace 3 times globally, ...
0
votes
1answer
130 views

vim: Text copied into * register disappearing

I'm having an issue where text yanked to unnamed is not available to paste afterwards. This only occurs when I am SSHd in to another machine. Both machines are running identical versions of OS X ...
1
vote
1answer
64 views

Better way to abbreviate dividers in Vim

I wanted a simple abbreviation to work as a quick page divider like typing: '>>>' becomes: '===============' 2 other requirements: 1) I want to be able to perform serial abbreviations (more than ...
1
vote
1answer
54 views

Automatically switch to Cyrillic in Insert Mode in Vim

Is it possible to make Vim switch to Cyrillic keyboard layout when I go to Insert Mode, then switch back to English for Command Mode (perhaps by executing setxkbmap)? Currently, I use it to edit a ...
1
vote
2answers
153 views

Should I create an empty $HOME/.vimrc, or copy /etc/vim/vimrc?

I want to make modifications to $HOME/.vimrc, but the file does not exist yet, so I need to create it. Should I copy /etc/vim/vimrc to $HOME/.vimrc, and then make my modifications, or should I just ...
0
votes
2answers
112 views

Automatically capitalize the first letter of sentence in Vim

When writing in MS Word, or in Open Office, the first letter of each sentence is capitalized automatically by the editor, without needing to press the Shift key. This makes typing much easier. Is ...
3
votes
0answers
706 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 ...
1
vote
0answers
100 views

OSX Mavericks .zshrc cannot source

I am trying to source my zshrc. It sources fine when before I add this line: . ~/Dropbox/configs/aliases Then I get this: /Users/mkrell/.zshrc:.:13: too many open files: Dropbox/configs/aliases ...
0
votes
1answer
431 views

How can I get syntastic to install properly?

I followed the exact steps listed on Syntastic's GitHub page to install it as a Pathogen bundle, but I'm not getting any Syntastic feedback at all in vim. Their FAQ states this is normally caused by ...
3
votes
2answers
212 views

How to format a string substitute, or a text line, in Vim?

Is it possible to format the replacement string when substituting a match with Vim? Say I have a file with a 2-column table, where the entries in each row are separated with a space. The entries (and ...
0
votes
1answer
44 views

Can I change a Vim setting persistently using a shortcut?

Can I change a Vim setting persistently using a shortcut? Hypothetical Example: nnoremap <script> <F7> :call ChangeConfig()<cr> function! ChangeConfig() set virtualedit=all ...
1
vote
1answer
137 views

Switch back to VIM before shell command finishes

When executing a shell command in VIM, it waits for the command to finish. You can press Enter to switch back to VIM, but it will only switch back after the command has finished. In the event of a ...
1
vote
1answer
34 views

Going back to the working dir after hitting u a couple of times in Vim, NERDTree

I thought I was working in a vim file and wanted to undo by hitting u. But sometimes I do it in NERDTree and it moves tree root up a dir by mistake. Now I have to dig into directories to go back my ...
0
votes
1answer
45 views

In Vim, why does searching “/A\n\zsB” work, but not syntax highlighting “:syn match Statement 'A\n\zsB'”?

Assume the following text file: A B Or in other words, a file containing only the string A\nB. Let's see if I can match any B preceded by A and a newline. Simple enough. I can do this sucessfully ...
0
votes
2answers
170 views

git using different version of vim than zsh

I've got a plugin called YouCompleteMe installed in vim. When vim starts with this plugin installed, it will raise a warning if the version of vim is under the minimum required. I'm using vim ...
2
votes
1answer
40 views

How to change the searched text under the cursor in vim?

Let say that you have the following text: test_text test_text_1 test_text_2 and you search for "text" (/text) and your cursor will go on the third "t" from "test_text", then how to change it (the ...
1
vote
1answer
94 views

Inputing the file path and file name which you are working in Vim

I use Ctrl-G to see the path. But I want to enter the path to the file itself. How can I achieve this in Vim?
0
votes
1answer
38 views

How to open a file after vimgrep and :cw in vim

I use :vimgrep /word/gj ./**/*.php to search a word in all files. Then I use :cw to see all the results. I use j and k to go through the results up and down. But I am not sure how to open a file.
1
vote
2answers
156 views

Prefixed (b:, g:) settings in Vim

I installed this plugin with Vundle and noticed that it has some settings (the README calls them variables) like: b:javascript_fold and g:javascript_conceal The README says I, "can add ...
0
votes
2answers
133 views

Is VIM adding the Windows newlines?

Notice the line endings from git diff: - IP_ADDR: 'http://1.2.3.4:143' + IP_ADDR: 'http://2.4.6.8:143'^M I edited this file by putting the cursor on 1 then pressing ct: and then entering the ...
1
vote
2answers
43 views

How to determine what buffer was changed externally with gVim?

I am using the following Vim autocommand in my .gvimrc file: augroup MyAuGroup autocmd MyAuGroup FileChangedShell * call FileChanedEvent_BuffUpdate() augroup END function ...
1
vote
2answers
100 views

Why is there a difference in the popup dialog from .gvimrc and command line?

I am using gVim's confirm() function to pop a dialog waiting for the user to click a button. However, there seems to be a difference in the appearance of the dialog when called from .gvimrc: Using ...
0
votes
2answers
33 views

Open another file in vim based off of the current file's name

When working with Go I would like the ability to open the corresponding test file for each .go file I am working with, and vice versa. The format that is followed is foo.go corresponds to foo_test.go. ...
0
votes
1answer
38 views

How to change the default button on gVim's W11 (“File has changed”) warning popup?

When working with a file that is regularly changing externally, a popup warning dialog is opened, asking whether to keep buffer contents (the default) or load the updated file into the buffer: Is ...
0
votes
3answers
91 views

Does ultisnips support html?

Ultisnips works fine with python and c, but when edit html files, it never insert the snippet at all. While youcomplete me suggest there is a snippet by the prompt. Does ultisnips support other ...
1
vote
2answers
110 views

Using :lgrep command in Vim and hiding results

I love using the :lgrep command in Vim to create a location list for the current buffer. For example I can use it with a Perl regex by doing: :lgrep -P 'pattern' % However, I don't like the fact ...
0
votes
2answers
67 views

How to swap the last name and first name without a comma with vim

I have a long list of name in order of Family name, First name. I'd like to change this to First name Last name with vim. What is the best way. Thank you for your help. Berclaz, Lucy Carlow, Rese ...
0
votes
0answers
304 views

Does vim's youcompleteme plugin require clang to auto complete?

From the youcompleteme's documentation, it's quite ambiguous what clang has done for it. Does it do syntax check? Semantics check? Or it's necessary to do auto completion? Actually, youcompleteme ...
7
votes
2answers
794 views

Why is vim leaving temporary file versions all over the place?

First of all I assume those files ending with "~" which are created by vim when editing a file are indeed serving the purpose of temporary backups while editing. But every time I open a file with vim ...
0
votes
1answer
72 views

Handling punctuation in text pattern with vim search/replace

In vim we have the :substitute command that searches for a text pattern and replaces it with a text string. How does one handle a text pattern with punctuation in it? Minimum working example: the ...
0
votes
1answer
193 views

where is vimfiles directory on mac OS?

I am a new user of mac OSX, I found there is no vimfiles directory under /usr/share/vim, but directory vim73 is there. this vim was shipped with OS and I didn't install it. vimfiles was used for ...
0
votes
0answers
73 views

vim and macvim are not reading my .vim directory

I have installed vim and macvim using macports, and tried copying over my .vim directory from linux. Neither seems to read anything from that directory: my customizations for folding and indenting ...
3
votes
2answers
59 views

vim command that will do :buff or :e if the file is not already in the buffer?

basically my workflow is as follows I have a bunch of windows open using splits in a terminal in regular vim. Sometimes I have a file open sometimes I don't I usually switch between :buf and :tag to ...
2
votes
2answers
252 views

How to use multiple spaces in listchars?

I'm currently using the following listchars I found on vim casts: set listchars=tab:▸\ ,eol:¬ I'd like to make tab be ▸ followed by 3 spaces, but I can't seem to get it to work. I've tried the ...
1
vote
1answer
67 views

Tmux - select entire lines

I'm using tmux with the following lines in my .tmux.def: bind p paste-buffer bind-key -t vi-copy 'v' begin-selection bind-key -t vi-copy 'y' copy-selection It works well and I can start copy mode ...
1
vote
0answers
375 views

URxvt: vim and cursorColor [invisible cursor or invisible cursor text]

Introduction I've always used a light-background terminal and a dark-background editor (vim). On this I'm not willing to compromise. In any case, I've just switched from xterm to urxvt ($TERM == ...
1
vote
1answer
54 views

Vim: Open multiple files in a specified configuration from command line

I use a set of tabs and splits in my Vim window for my workflow. My setup looks something like this: 1st tab with a vertical split showing two buffers. 2nd tab in the following split: ...
1
vote
1answer
53 views

How to move cursor to next wrapped line in Vim?

For example, if I have a long line wrapped several times, it is painful to move cursor inside this line, I have to hit w repeatedly, or use f to find what I want, even slower if there are many same ...