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

-3
votes
1answer
61 views

Home Row worth it? [on hold]

I was wondering if it would be worth it for me to learn home row? I already type very fast and accurately without it and learning it seems like a hassle, but using Vim it seems like it might be ...
0
votes
1answer
13 views

Is it possible to convert a text that's in the form of a changelog from oldest-first into newest-first, using vim?

Is it possible to convert a text that's in the form of a changelog into newest-first, using vim? It's like this: version 1.0 multi_line description for 1.0 version 1.01 multi_line description ...
9
votes
3answers
786 views

Why is Vim adding a newline? Is this a convention?

If I open Vim and type itest<Esc>:wq then I get a file that has no newlines in Vim but does seem to have a newline in the code: $ vim -u NONE test.txt $ cat test.txt | hd 00000000 74 65 73 74 ...
0
votes
1answer
37 views

How to yank or delete multiple lines in Vim, all in different ranges?

I've seen a couple of questions about yanking and deleting a range of lines in Vim, for example, from line 5 to line 10. However, I haven't found (in documentation and googling) about how to ...
0
votes
0answers
23 views

Why none of the rainbow parentheses plugins work with filetype=php?

I've tried a dozen rainbow plugins. They all work, until i open a php file or set filetype=php. Then I get parentheses with the same color in that buffer. what is the reason for this? I tried ...
3
votes
1answer
96 views

Txt file contains bin characters which doesn't render properly in vim

The txt file with the content opens properly in the GUI editor (i am using sublime). But in vim, it appears like this, now i can't do the grep in this file. When i use less, it says "may be a binary ...
1
vote
3answers
55 views

Standardize \n and \r in Vim's search/replace syntax

In Vim, one searches for newlines as \n, but newlines in the replacement-string must be entered as \r. I understand that there are reasons for this behavior, but for my purposes I just find it ...
1
vote
2answers
49 views

What color scheme is used for the code examples on o'reilly atlas site? [closed]

I would really like know what colorscheme this is, and if it is already available for vim. The screengrab is taken from the O'Reilly Atlas site. Link to the actual site with more code examples.
1
vote
1answer
17 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
54 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
30 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
28 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
30 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
22 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
36 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
37 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
54 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
66 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
26 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
24 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
52 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
33 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
31 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
51 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
33 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
29 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
52 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
37 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
37 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
78 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
26 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
101 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
29 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
27 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
29 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
63 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
67 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 ...