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
10 views

Highlighting showcmd in vim

vim has the option to set showcmd. It causes part of the entered command to be shown at the bottom line, on the right. If I am not wrong, it shows up to 10 last typed characters. What I wish to know ...
3
votes
1answer
46 views

What does Shift+Enter do in a terminal, and can I disable it in Vim?

Everyone once in a while while in insert mode in Vim, I'd be happily typing along, when all of a sudden I'd be thrown out of insert mode and my last edit undone after hitting a certain key ...
0
votes
2answers
26 views

Get ST ctrl+r behavoiur in VIM

In sublime text, when i have a file open and press ctrl+r, I get a typeahead window with fuzzy matching on all function- and class definitions in the file, making it possible for me to type some of ...
0
votes
1answer
27 views

Vim move word skips dot

I'm using MacVim with spf13 and when I use w to move a word forward, dots are seen as part of the word. myObject.myMethod() ^ ^ ^ | | | cursor | ...
0
votes
1answer
27 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 ...
0
votes
1answer
16 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
29 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
34 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 ...
1
vote
1answer
37 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
21 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
49 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
24 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
22 views

vim autocomplete search from middle of word

Are there any plugins that provide 'middle of word' autocomplete 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 ...
0
votes
2answers
48 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
33 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
0answers
30 views

what are the pros/cons of cygwin x86_64 vs x86 version on win7 64b?

So far I have always used the 32b version of cygwin in all my machines (3 that I use frequently, all 64b win7). Now I am going to get a new desktop, another win7 64b, and I was wondering whether it ...
0
votes
1answer
31 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
21 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
29 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 ...
0
votes
1answer
50 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
32 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
27 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
37 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 ...
1
vote
0answers
43 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
33 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
31 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
76 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
25 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
97 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
27 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
28 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
25 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
30 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
73 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
17 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.
0
votes
2answers
28 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
46 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
32 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
66 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
25 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
27 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
32 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
27 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
25 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
71 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
669 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
34 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
29 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
22 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 ...
2
votes
2answers
33 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 ...