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

1
vote
2answers
18 views

How to adjust the command prompt window size in Vim?

Recently I've run into this problem: the bottom buffer that normally used only for displaying command prompt has become larger than normal. It only happens when I'm using a combination of quickfix ...
1
vote
1answer
28 views

Does anyone know a good tiling window manager that uses vim bindings?

Like it says in the question, I'm looking for a window manager that uses Vim bindings, I've tried StumpWM but since it's based around EMACS bindings I find its learning curve to be a bit steep... Any ...
29
votes
9answers
2k views

Why arrow keys are not recommended in Vim

"Never use arrow keys in Vim!" I heard this from a random speaker, but didn't have the chance to ask him why. Also, if you don't use the arrow keys, how can you move the cursor in the Insert ...
1
vote
1answer
19 views

How can I prevent Supertab to try completion even if I just want to enter a tab?

Even when I have an empty buffer in vim, supertab tries to do a completion at the begining. How can I configure supertab to only try tab-completion if there's a character?
1
vote
2answers
24 views

Setting vim options only for files in a certain directory tree?

There is a programming project I work on where everyone else uses a tabsize of 4, so I find it most straightforward to set tabstop=4 in my ~/.vimrc. However, I'd rather not have this affect every file ...
0
votes
1answer
36 views

Vi only show 16 lines, how to show full screen?

My vim only show 16 lines, using terminator, how can i make it back to full screen? It is very annoying. Don't know what settings has to change.
0
votes
0answers
19 views

Vim SuperTab on Windows not expanding

I have supertab vim plugin installed. However when I type something in insert mode and press tab I'm getting: =SuperTab('n') with a new line. I'm using windows and the behavior is the same in command ...
0
votes
1answer
31 views

Getting rid of characters when doing gf in vim

I am using vim for coding. When I have something like the following: SomeModule->actualMethod() if I take the cursor to SomeModule and I do a gf I get a complaint that SomeModule- does not exist in ...
0
votes
0answers
33 views

SQL Completion Tutorial on vim

I'm attempting(!) to start the sql completion tutorial on vim: I've created the empty file tutorial.sql I enter insert mode ok (press i). Then I need to hit <C-C>s which I assume is ...
0
votes
1answer
15 views

NERDTreeToggle opens in Windows/system32

I've added the following useful settign to _vimrc: map <F2> :NERDTreeToggle<CR> If I open gvim and then press F2 NERDTree will open but in the directory Windows/system32 which takes a ...
0
votes
0answers
10 views

Open file as administrator using NERDTree

If I ever need to play around with any read-only files in C:\Program Files\ then currently I open gvim in administrator mode and then make the changes and then leave (quickly). Is it possible to not ...
4
votes
0answers
48 views

Vim-like window manager [closed]

In my daily work I use a lot vim as my editor and the tiling window manager awesome. In my opinion both are great tools. What I don't like about awesome (and multiple other tiling window managers) are ...
0
votes
2answers
44 views

How to exit VIM and get back to 'normal' terminal?

I did find this answer here: Vim Stuck In Insert Mode However none of the commands listed worked for me. Exit, cntrl + [, cntrl + q I'm a totally terminal newb, trying to learn how to setup git ...
0
votes
1answer
28 views

Is there a way to filter out filenames from vim's “oldfiles”, perhaps using a pattern?

I use vim's :browse oldfiles a lot to edit files I've recently worked with. However, there are some files, such as git's auto-generated COMMIT_EDITMSG, which clutter that list and which I never need ...
1
vote
2answers
40 views

how to change the font in text mode VIM (not gvim with GUI)

I'd like to change the default font in VIM to Adobe Source Code Pro on a CentOS server (without desktop GUI). I've installed the OTF fonts in the package. How can I have the new monospace font set ...
0
votes
1answer
23 views

python related plugins give errors in vim

So here's an example of a vim plugin having python issues: Error detected while processing function UltiSnipsEdit: line 6: Traceback (most recent call last): File "<string>", line 1, in ...
0
votes
0answers
20 views

Vimscript: Unable to run python script that imports win32 library

I am writing a vim plugin in python that fails when importing the python library "win32com.client". The following reproduces it: myplugin.vim: pyfile [path to python file] python file: import ...
1
vote
1answer
27 views

Check if Vim has more than one window open

I'd like to overload my tmux binding which cycles through panes to also cycle through Vim windows if the current pane happens to be running Vim. I can detect the presence of Vim by checking the pane ...
0
votes
1answer
35 views

How to switch to an existing vim instance from inside of screen when opening a file twice

When i work on many files with screen and vim, often i try to open a file already open.. I must switch manually between screen windows witch ctrl-space and press ctrl-g until i find the right window. ...
0
votes
2answers
89 views

How to use vi as a full featured programming editor

I have seen people being able to use vi for programming purposes and being able to see e.g. the methods a file contains, jump from a method invocation to its definition etc. I.e. being able to use it ...
1
vote
1answer
39 views

Vim is putting two tabs whenever I punch in tab

I have the following settings to have two-space sized tab stops: :set tabstop=2 :set noexpandtab :set shiftwidth=2 However, every time I hit Tab, two 2-space-width tabs go in. I just want a ...
-1
votes
2answers
58 views

Is vim better installed in C:\Program files\

I've installed gVim and the install has gone into here: C:\Program Files (x86)\Vim Would there have been advantages to installing it in the following location?: C:\Users\myName\Vim
2
votes
2answers
36 views

Extending Vim Mappings to Run N Times

I want to be able to type something like 'Ncom' in normal mode that will comment out the current and then next N-1 lines. A key-mapping that I made to do so is, :nmap com ^i#<ESC>j. This does ...
0
votes
1answer
30 views

What does shiftwidth do in VIM editor

I read this about shiftwidth option on Google: To change the number of space characters inserted for indentation, use the 'shiftwidth' option. Ok Ok, but what's that more exactly? How can I try this ...
2
votes
3answers
68 views

How do I keep vim from writing anything to the hard drive?

I would like to temporarily store and manipulate sensitive data in vim. I know it keeps cut and copy registers and swap files on the hard drive, though. If you think about this for a moment, you'll ...
0
votes
4answers
37 views

Vim inserting characters before a comma on multiple lines

Say I have the following DRAFT, SAVED, ARCHIVED, DELETED; And I want the following: DRAFT("draft"), SAVED("saved"), ARCHIVED("archived"), DELETED("deleted"); How can I do this with vim? I'm ...
-1
votes
0answers
39 views

Hex-editor with regex [closed]

I'm looking for a hex-editor with regex or other options where I can search and replace bytes by a certain set of rules, like increment a selection by x. I know vim may able to do it, but I don't ...
4
votes
2answers
39 views

Vim joining lines during wraping

I am using formatoptions to format my files. But if I have a new line character in my tex file, Vim joins the lines, removing this character. How to define in Vim the hard wraping without joining ...
0
votes
1answer
54 views

Any equivalent command to let emacs change the buffer layout like Vim?

In Vim, there are a bunch of shortcuts for window switch. For example, when there are 2 windows in one tab, split vertically, I can use CTRL-W J/CTRL-W K to make the 2 windows arranged horizontally. ...
2
votes
1answer
44 views

Edit Current Command in Zsh Vi Mode

So I know that you can set vi mode in bash with set -o vi I also know that you can set vi mode in zsh with bindkey -v The vi mode in bash has a great feature that allows you to edit the command ...
0
votes
2answers
45 views

VIM Editor: File Enconding and Line Endings

When saving files, these are my default settings in TextMate (Mac OS X): File Encoding: UTF8 (recommended) Line Endings: LF (recommended) How can I set VIM to save files with the same file encoding ...
0
votes
1answer
23 views

Curly underline for SpellBad

I am sort of new to vim, and I have a simple question: I'm using vim for editing .tex documents and I am using spell checker (spell). The problem is that when cursorline is enabled I can't see the ...
0
votes
1answer
85 views

OS X + tmux + vim + solarize + colors

I want to use tmux with console vim having solarized colors on OS X, but the colors are broken inside tmux. There are quite some questions/answers and blog posts about that topic, but solutions ...
6
votes
7answers
148 views

Vim - Adding empty line between lines

How do I insert a blank line between every non-blank lines? eg. from line 1 line 2 line 3 line 4 line 5 to line 1 line 2 line 3 line 4 line 5
0
votes
0answers
26 views

Use zsh completion in vim instead of vim one

I like zsh completion where for example I can write f/o/fTab and get folder/other_folder/file.txt (I'm not sure, it's possible feature of oh-my-zsh, not zsh, but it seems that it doesn't matter) Also ...
0
votes
2answers
24 views

vim c/c++ ftplugin scripts

I make some additions to the regular runtime in my vim configuration. I add to rtp a directory where there are ftplugin directory, in which I have two files: c.vim and cpp.vim. In these files I ...
0
votes
0answers
31 views

Vim display invisible characters

I am trying to display invisible characters in Vim by the following in my vimrc set list set listchars=tab:▒░,trail:▓ But every time it shows me the wrong characters. I have encoding=utf-8. I set ...
1
vote
1answer
40 views

How can I get VIM to copy to system clipboard?

I know this has been asked about a hundred times, and I have looked through almost every answer, I'll get to the point: "+y "*y set clipboard=unnamed set clipboard=unnamedplus set clipboard+=unnamed ...
1
vote
1answer
32 views

Annoying newline issue with MacVim

A lot of times when I open a file with MacVim and close it, without doing any saving, SVN always shows that the file was modified. Upon doing svn diff on the file, I get something like this: ...
-1
votes
1answer
59 views

Cannot use vi editor

When I try to launch vi using vi or vim, it fails to start. ozzesh:~ # clear ozzesh:~ # vi ozzesh:~ # echo $? 0 ozzesh:~ # The above vi / vim command can't launch vi.
1
vote
1answer
25 views

Font characters change to gibberish sporadically in vim

I use vim on a Mac in iTerm2 (ie - not MacVIM) and within a tmux session. I have powerline installed, so that's something to keep in mind. Sometimes, when I'm typing in a particular file, for some ...
2
votes
1answer
33 views

My syntax files don't contain @Spell declarations

Apparently spell checking is something that should come by default in vim. However, many (the majority actually - 154 with spell declarations vs 397 without) of the shipped syntax files don't appear ...
2
votes
2answers
35 views

Converting epoch seconds to time inline (preferably vim, but command line would be cool)

I have a file with the format 47 2013-05-01 1367406011 2 30 15 47 2013-05-01 1367406388 1 29 14 43 2013-05-01 1367407469 1 26 12 42 2013-05-01 1367407489 1 25 11 42 2013-05-01 1367407810 1 24 11 39 ...
0
votes
1answer
45 views

how to use vim to manage and send emails

I would like to use vim/gvim as tool for mail managent and I found these 2 interesting pages. claws vmail I understood that these suffer from the following limitations with vmail you can see and ...
0
votes
0answers
32 views

VIM - Only last line updates with scroll?

Searched around and couldn't find anything but cheat sheets for commands, perhaps my Google-fu is lacking these days. Any guidance here is much appreciated. I've never seen this before, not sure what ...
0
votes
1answer
28 views

Delay when switching modes

When using vim in gnome-terminal there is a 1s delay after pressing <Esc> to go back to normal mode. I tried Google and found ttimeoutlen. I tried setting it to 100 with no effect (delay is ...
0
votes
1answer
43 views

Cannot get Vim to remap CTRL+S to `:w`

I've been trying to get Vim to remap CTRL+S (or ^S) to :w by editing my .vimrc file, however it doesn't work. This is my current ~/.vimrc configuration: nmap <c-s> :w<CR> imap ...
1
vote
2answers
38 views

How to create and run a macro that runs on current visual selection?

I'd like to create a macro so that if I select a piece of text (either by a keyboard or a mouse) and invoke this macro, it adds [b] and [/b] around the text (for example). I'm familiar with recording ...
2
votes
1answer
23 views

Is it possible to restrict modeline in vim to only allow certain settings?

Is there a way to configure vim to enable 'modeline' (and by extension, setting 'modelines' to be non-zero), but restricting the parsing capability of modelines in files? I want to enable setting of ...
2
votes
0answers
59 views

Vim upside down question marks on whitespace

I've installed spf13-vim on my Vagrant machine with Ubuntu. The issue is that when I log into Vagrant with vagrant ssh and run Vim then I get all these upside down question marks on either making a ...

1 2 3 4 5 38