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

vim editor full screen in putty

I am using putty to connect to my linux server and if I open any files with vim or vi editor the editor margins are getting limited, whereas the same full screen is coming if I open in XTERM. My ...
0
votes
0answers
49 views

Can’t set color of vim

I've asked same question to stackoverflow but It evaluated offtopic at stackoverflow. http://stackoverflow.com/questions/23667728/cant-set-color-of-vim?noredirect=1#comment36357524_23667728 If it ...
0
votes
1answer
67 views

Windows Vim symlink config file persistent error

I'm trying to configure the native Windows Vim/gVim and the Cygwin Vim/gVim to behave nicely together. To this end, I created symlinks, ~/.vimrc and C:\Users\<myusername>\_vimrc, that both point ...
0
votes
1answer
32 views

how do I grep within vim using some default parameters?

I often run a command such as this from within vim: :grep -r --exclude-dir=./.git --include=\*.cpp --include=\*.hpp . But I would like to not have to write this everytime I want to grep within vim, ...
3
votes
4answers
88 views

How do I sort multiple blocks of text by the first line in each block in Vim?

I have multiple blocks of text, or in other words, multiple functions like this: def ==(other) ... end def to_s(full=false) ... end def to_a ... end def to_hash ... end def inspect ... ...
0
votes
2answers
60 views

Vim: How to append even lines to odd lines

I have the following lines. 1 4 2 10 3 20 4 35 5 56 ... ...(many more lines after this) And I want to change to the following in Vim. 1 4 2 10 3 20 4 35 5 56 ... ... How can I achieve this?
2
votes
0answers
178 views

Using vim / vimperator key bindings in Midori

I have recently been struggling to find a good lightweight browser with Vim keybindings that will run on Debian Linux (wheezy). Dwb crashes all the time, Luakit is very old, Chromium has memory ...
0
votes
1answer
43 views

How to expand lines in Vim Latex

As you can see when I open a LaTeX file in vim, lines are folded up. How can I expand them at once?
-2
votes
1answer
56 views

Vim - Using Functions to Search (.vimrc)

I'm have a timing problem with a function that I use to search in Vim. I need the search to be executed immediately, not after the function ends. I'm using "feedkeys" function (eg. ...
1
vote
0answers
103 views

I can't get XFCE terminal to display VIM's colorschemes

That's what I have in my .bashrc if [ -n "$DISPLAY" -a "$TERM" == "xterm" ]; then export TERM=xterm-256color fi In my .vimrc I have: set t_Co=256 echo $TERM prints xterm-256color tput ...
0
votes
1answer
76 views

Search for non-characters (character replacement indicators)

I have a text file (actually a .csv exported from .xlsx in LibreOffice) with lines that have gibberish when opened in LibreOffice Calc. In VIM they appear as the following: Joe User, joe@user.com, ...
0
votes
1answer
220 views

trouble installing powerline pre-patched fonts on mavericks 10.9.2

I have already installed vim-powerline in vim using vundle, but I am having trouble installing any of the pre-patched powerline fonts in the Lokaltog/powerline-fonts github repo. When I download one ...
0
votes
1answer
32 views

Open multiple files in vim some Read Only and some Read and Write

I know I can open files in Read only mode vim -R file and I can open multiple files with vim file1 file2. Is there a way, when opening multiple files at once, to open selected files as read only while ...
0
votes
1answer
393 views

VIM Colorscheme Gets Correct Only After vimrc Write

I have this weird problem that I've setup my VIM to use solarized colorscheme, but every time I open VIM, it shows wrong colors. In addition, I have a line in my vimrc that tells VIM reload vimrc ...
0
votes
0answers
36 views

Importing pygments' highlighting to vim

Usually, vim does very good job in highlighting, using the packaged syntax files. Unfortunately, it does bad job with MySQL. At first, I looked everywhere for a better MySQL vim syntax file, with no ...
0
votes
1answer
47 views

Why doesn't vim always give me the option to delete a swap file?

If I restart vim after a crash, it'll tell me that a swap file for my file exists, and ask me what to do--open anyway, recover the file, quit, abort, etc. Sometimes it gives me the option to delete ...
2
votes
1answer
76 views

vim: mouse click to resize split but not move cursor

How can I configure vim to use the mouse to resize window splits but not reposition the cursor when I click elsewhere in the buffer ? :set mouse=n enables window split resizing in Normal Mode but ...
0
votes
2answers
81 views

vim remap key mapped by a plugin

In vim, I have a key mapping conflict. The :map command gives me: n <C-N> * :<C-U>YRReplace '1', p<CR> ov <C-N> * :NERDTreeToggle<CR> How can I clear the ...
0
votes
1answer
97 views

Vim syntax highlighting lost on single file

I have a strange thing happening on a single file. When I open the file under it's original name, the highlighting is lost (":syntax on" does nothing). But if I cp that file with another name and open ...
0
votes
1answer
38 views

How to merge specific lines and remove specific newlines from a text that's in the form of a changelog, using vim?

I have a changelog that's like this: version 1.90 (1 newline) Released on 27 April 2014 (2 consequent newlines) Added feature x ---> (first entry for 1.90) (1 newline between ...
0
votes
1answer
140 views

Vim colors do not appear correctly in tmux terminal running within rxvt-unicode terminal

I am using Debian (Jessie). My ~/.vimrc file contains the following statement. colorscheme murphy My ~/.Xresources file contains the following properties. URxvt.background: #000000 ...
1
vote
1answer
56 views

Go to definition in different file in vim

I'm using slimv to create a small common lisp project. I would like a way to jump to the definition of a function I defined in another file. Is there a way to do that?'
0
votes
1answer
305 views

Change menu/ui language of vim to english

I search on google and I read several answers but I am unable to change the menu/ui language of vim to english. Im my .vimrc I have set langmenu=en_US.UTF-8 language messages en_US.UTF-8 but it ...
0
votes
1answer
59 views

Vim experts: how to find a number within a range based on two numbers? Eg “777” matches “667:888”

I need to search for numbers in a text with Vim. The numbers I need to find are often within a range based on two numbers and I need to match that range based on a single number. For example, in my ...
2
votes
2answers
52 views

Highlight Search (hls) matches of multiple search terms with different colors

Many times when working on code, I search for the occurrences of variables with similar names. For examples, find all matches of var1 and var2 as: /\<var1\>\|\<var2\> Now I really like ...
0
votes
2answers
152 views

home/end in INSERT mode in vi on a Mac

On a Mac I can go to the start and end of an line in vi, when not in INSERT mode: ^ (start of line) $ (end of line) This is for example explained here: How do I do “end” , “home”, “page up” and ...
0
votes
1answer
21 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 ...
13
votes
3answers
1k 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
63 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
1answer
149 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
113 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
77 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
142 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
39 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
85 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
112 views

Is it possible to get Sublime Text's “Goto symbol” behavior on pressing Ctrl + R in Vim?

In Sublime Text, when I have a file open and press Ctrl + R, I get a type-ahead 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
76 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
140 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
393 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
45 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
67 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
167 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
38 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
477 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
29 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
45 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
120 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
42 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
38 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, ...