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
81 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
2answers
41 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
46 views

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

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.
3
votes
1answer
51 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
1answer
14 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 ...
0
votes
3answers
55 views

How to use my Eclipse CDT syntax coloring setup as my gVim color schemes?

As Eclipse cannot show two pans of code simultaneously, I am used to using gvim to have it. But the color scheme / syntax coloring is different, what makes code review and comparisons hard. Is there ...
1
vote
1answer
46 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 ...
2
votes
1answer
3k 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 ...
2
votes
5answers
1k views

Are there any tree-like explorers for GVIM?

Is there a kind of explorer for GVIM where I could see a project in a tree structure with its containing files, so I could easily navigate through them? If there is any other functionality such as ...
0
votes
2answers
27 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 ...
1
vote
1answer
53 views

Mouse scrolling in vim through tmux, how to configure?

I'm using a combination of PuTTY, tmux and vim. If I just open an SSH connection with PuTTY and then open vim, mouse scrolling works as expected. But if I open tmux and then open vim inside tmux the ...
0
votes
1answer
28 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
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 | ...
1
vote
4answers
242 views

How to use a text editor WITHIN the Command Prompt in a Windows OS?

Some input on this topic would be great. I would like to be able to create and edit the text of a file, all from the command line. No pop-up window (like with notepad), just create the file and start ...
0
votes
1answer
18 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
33 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
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
53 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 ...
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
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
1answer
25 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?
0
votes
2answers
51 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 ...
1
vote
1answer
23 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 ...
1
vote
3answers
2k views

How to setup VIM for php development?

I have been trying a lot (but not smartly) to figure out setting up VIM, ctags, omnicomple for PHP development. On Googling I found this file. But have no clue how to use it. What have I done until ...
0
votes
0answers
31 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.
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 ...
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 ...
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 ...
1
vote
2answers
28 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 ...
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 ...
3
votes
3answers
2k 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 ...
1
vote
0answers
45 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
35 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
35 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 ...
5
votes
4answers
1k views

How can I discard file change from fugitives status window?

When in the fugitive-plugin status window, accessed using :Gstatus, it's possible to diff changes for a file using D and toggle files for commit using -. Is there any similar shortcut for discarding ...
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 ...
13
votes
6answers
9k views

How to start gVim maximized?

How to make gVim automatically maximize it's window when I open it? And a cross-plataform solution, I'm trying to use the same configs in a Linux and Windows machine... I've tried the hack :set ...
1
vote
1answer
98 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 ...
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 ...
3
votes
3answers
148 views

Run command on shell and get output in vim

I know how to run shell commands within vim using :!r and :!, but is there a way I can do that from outside, i.e. from bash? Something along the lines of vim 'ls -al'. The output of ls should be in ...
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 ...
1
vote
2answers
1k views

Changing Vim Home Directory

Previously I've been using vim without any problems. However a few months ago our company made some network and security updates. After that whenever I plug a network cable into my laptop, it creates ...
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 ...
6
votes
4answers
7k views

How to get rid of the warnings when opening a file that has a .swp file?

How can I get rid of the annoying warnings when I open a file that has a .swp file? Or, how do I not generate the .swp files at all? Example warning: E325: ATTENTION Found a swap file by the name ...
0
votes
2answers
26 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 ...
5
votes
2answers
1k views

Vim completion - always suppress the newline after I select a suggestion with the Enter key

Sometimes, after I select a suggestion (from the completion pop-up that appears when pressing Ctrl-N) using the Enter key, Vim will insert a newline and the cursor will be moved to the following line. ...
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 ...
3
votes
4answers
359 views

vim7.3 on windows XP: can't set vim as default file type for .cpp/.h files

I've tried the usual process. Open Properties of a file of the type I want to change Select the "Change" button after "Opens With": Browse to C:\Program Files\vim\vim73\gvim.exe Select OK What I ...