vim (Vi IMproved) is a text editor supporting different editing modes.

learn more… | top users | synonyms

2
votes
3answers
135 views

Can I speed up pasting into vim?

I copied a part of the HTML out of a web page and wanted to save it in a file. For that I started a new vim session in a terminal window, with a (new) filename specified on the commandline, hit i to ...
1
vote
0answers
16 views

Creating specialised dictionary file for VIM (from Wikipedia?)

I use VIM's dictionary completion feature very frequently, yet have found it unhelpful when it comes to 'specialized' terminology, in my case German philosophical terms. I would now like to create my ...
3
votes
6answers
4k views

How can I check what version of the VI editor I have?

How can I check what version of the vi editor I have? What's the best way to upgrade it or install vim on Solaris?
7
votes
9answers
3k views

Compiling code from vim

New to vim and and I want to be able to compile code from within vim without running a new terminal and calling the compiler. How do I go about doing this? Note that this requirement is not ...
10
votes
2answers
1k views

How to change the name of a vim buffer

Is it possible to change the name of a buffer in vim? Specifically, I'm using Conque Shell to open shells in vim (each shell is in a buffer) and with multiple shells, I see: 10: bash - 1 11: bash - ...
0
votes
0answers
19 views

What are your most useful custom keymappings in Vim? [on hold]

What are your most useful custom keymappings in Vim? Also! More specifically, what are your most useful mappings to the leader key?
1
vote
1answer
424 views

Vim colorscheme background not filling terminal

I am using vim with lxterminal, and the colorscheme kolor, and I am experiencing an issue where vim's background color does not fill the entire terminal. It can be seen clearly at the bottom of ...
5
votes
2answers
6k views

“No protocol specified” when running vim with sudo

Recently I start to get "No protocol specified" when using sudo vim. It's just a warning I guess, because everything was working normally (I can open, edit and save files). The message doesn't appear ...
0
votes
2answers
19 views

Is there a way to limit a vim window to show only a portion of a buffer?

Sometimes when working with big files containing many functions I would like to create some splits showing specific functions and nothing more. Is it possible in vanilla vim or with some plugin to ...
2
votes
1answer
25 views

Vim - Automatically changing the pair of a changed HTML tag

How can I configure Vim so that when I change one member of a matching pair of HTML tags, the other is automatically changed to match? For example: given <span>content</span>, I want to ...
0
votes
0answers
20 views

Set default editor for 'info coreutils' [duplicate]

I'm using Ubuntu 14.04 and have this in my .bash_profile: export EDITOR=/usr/bin/vim export VISUAL=/usr/bin/vim man respects this setting but info always opens in something else, nano or it's own ...
2
votes
1answer
43 views

tmux vim colorscheme background is not showing

I have installed tmux but now text mode vim colorschemes do not fill the background colour properly. Here is how it looks with colorscheme xoria256 in the normal Ubuntu 14.10 terminal: And here ...
1
vote
0answers
22 views

How to map emacs multi-modifier keys in vim?

I want to be able to map the multi-modifier keys of emacs in vim. I am trying this for exiting vim: imap <C-x><C-c> <ESC>ZZ However, this does not work.
0
votes
2answers
37 views

Why does my vim status line say “Obtaining ../”?

On the righthand side of my vim status line it says "Obtaining ../" and is highlighted yellow. Why does it say this? The results of :set are: :set --- Options --- cpoptions=BceFs history=1000 ...
1
vote
1answer
113 views

Vim search in global variables

I can display variables in vim using :let g: but I cannot search in it (keybindings seem very limited). Can vim open this content as internal buffer or pass to some other command?
4
votes
1answer
348 views

Vi: On startup, highlight tags and display tags in a preview window

I am using vi as a note-taking and outlining tool. I am constructing the "tags" file by myself. What I would like to do is that when I open my notes or outline file, vi reads the tags present in this ...
18
votes
7answers
4k views

Advantages of using set -o vi

I have seen many developers using this command to set the option to vi. I never understood the real use of this? When using bash commands, what help does switching to vi provide?
0
votes
0answers
29 views

NERDTree don't create window on open when file is not saved

Is there a way to convince NERDTree to always hide editor window? Because when I open file and I have unsaved changes in previous one, NERDTree will open new window, so it is opened in split. I don't ...
1
vote
2answers
40 views

Getting vim to go to the first line and enter insert mode when writing an email with mutt

Mutt uses vim as its editor, and its temp files are in /tmp/mutt-* I want vim to auto-insert on the first line when replying to an email in mutt. here is the applicable line from my .vimrc: autocmd ...
1
vote
1answer
28 views

Vim: x-terminal key mapping

I normally use Vim on Windows and have had no problems with key-mapping, but now that I'm using a virtual machine running Ubuntu, accessed through MobaXterm, things don't quite work as they should. ...
1
vote
2answers
39 views

In Vim, why does `2ci"` delete the surrounding quotes?

ci" (and 1ci") leave "s intact; why does 2ci" (and the same formula with any higher number) delete them?
0
votes
0answers
19 views

Gvim terribly slow redraw

I am on the last Arch Linux distribution using gnome desktop. And it is nearly impossible to work with gvim. For example, using opening python files make a mess on a screen when I start opening ...
6
votes
2answers
2k views

How to allow Page Up in GNU Screen?

I use Vim to edit text files on Linux. Commonly I connect to remote Linux machines using PuTTY from Windows. I use GNU Screen commonly as well. When using Vim inside Screen I am unable to use the ...
1
vote
1answer
34 views

.vimrc does not working as expected

I've been trying new color schemes and I set: colorscheme gotham256 set background=dark set t_Co=256 highlight Normal ctermbg=NONE highlight nonText ctermbg=NONE but these thing ...
2
votes
1answer
68 views

How to use CapsLock instead of Escape in Vim?

I would like to map my CapsLock to Escape. How do I represent CapsLock in .vimrc? I know to map space to a command I would do something like this: :map <space> viw How would I map CapsLock ...
8
votes
2answers
417 views

In VIM, replace path with slashes without using escape slashes

In vim I want to substitute a long path /a/b/f/g/d/g with another /s/g/w/d/g/r in a text file. Usually I use \/ but there are too many slashes here. Is there an easier way?
3
votes
3answers
2k views

How to copy from one vim instance to another using registers

How can I select the + register? I have problems following the instructions below to copy/paste text from vim to another vim: In the vim, highlight, select + register, and yank (save) to it: Shift-v ...
15
votes
5answers
2k views

Automatically create matching braces in vim

How do I automatically create matching braces in vim? It should work as follows: If I input an open brace the closing one should appear automatically and the cursor should be placed in between. To ...
0
votes
1answer
49 views

Auto code completion in GEdit and VIM, for C++

Being a Visual Studio fan, I am just wondering if I can have same feature in GEdit and VIM. PS : I’m new to VIM and currently using CentOS and Ubuntu.
1
vote
1answer
23 views

Vim command to turn hard wrapped lines into visually wrapped lines with preserved formatting

Given the following strings each on a separate line (which I indicate by prefixing line numbers) with syntax specific indendation: 1 Standard string with only text or code from some programming ...
2
votes
2answers
486 views

How to fix weird vim polluting the terminal behaviour on arrow keys and on delete in insert mode?

My terminal gets polluted by B, C,A,D when I try to navigate within vim using arrow keys and on delete using backspace it only scrolls back without deleting the characters on screen while the ...
0
votes
2answers
57 views

Adding color scheme to Vim

I would like to add this color scheme to Vim any suggestions on how I could accomplish that ?
2
votes
3answers
41 views

The vim navigation sweet spot, medium-distance jumps

In vim I often find myself j-stepping by line to go, say, 8 or 10 lines down. For example, if I have a directory open in netrw and the directory I want is 8 lines down I will just jjjjjjjj+ENTERENTER. ...
2
votes
2answers
85 views

Anyway to navigate percentage-wise in vim?

I often open large files, looking through logs for finding info. As all lines have timestamp in my case and I am sure of in which part of the whole file the info is present which I am interested in. ...
7
votes
2answers
343 views

Bash inside Vim not working properly

In MacVim I'm using Conque to run bash commands inside Vim. I have a problem with the text navigation while using Conque. If I'm at the end of a line of text and press down Alt← I skip a word to the ...
2
votes
1answer
100 views

What does the underscore motion do in vim?

I don't understand the underscore motion in vim, at least in the context of yank (y). My cheat sheet reads "soft" bol down which I do not comprehend. If I use the motion alone it seems to be the ...
0
votes
1answer
18 views

Move to other end of paragraph in vim (not a visual block)

If I have a paragraph selected in visual mode (eg, vap), I can swap the cursor between the ends by using Shift-O. Is there a way to do this in normal mode?
4
votes
2answers
1k views

Copy-paste for vim is not working when mouse (:set mouse=a) is on?

I was trying to copy paste something from vim to another application and also, from that application to vim using right click with mouse and then copy and paste (or with Ctrl+v and Ctrl+c and also ...
1
vote
1answer
42 views

In VIM how do you run a command silently in the background?

I'm using ubuntu and currently have the following line in my vimrc file: nnoremap < leader >dc :execute 'silent !drush cc all' | redraw! The command works but it doesnt hit me back to the ...
0
votes
1answer
9 views

:bnext not cycling through all buffers in vim

For some reason :bnext is not cycling though all the buffers shown by :buffers I have 5 buffers open but only 3 buffers are visited when I used :bnext repeatedly. How can I cycle through all the ...
0
votes
2answers
76 views

Open list of files in vim to specific lines

I know about vins command line operator but I need a version that works on multiple files . For instance I have a stack trace file and would like it to open all of the files to the line in a ...
0
votes
2answers
59 views

Select an item in vim autocomplete list without inserting line break

A rather annoying feature of vim is that if you are in insert mode and do an autocomplete (Ctrl-N), arrow key down to the desired item, and press the Enter key, then it inserts the item but also ...
0
votes
1answer
93 views

How do I use vim on the command line to add text to the middle of a file?

I am trying to write a command along the lines of the following: vim -c "XXXXXX" myFile Instead of the "XXXXX" I want to supply some commands to vim to add some text to an arbitrary point in the ...
10
votes
5answers
2k views

How can I paste (overwriting) with vim?

In vim I use yy and p all the time to yank and paste lines. However, if I want to replace one line multiple places in the file, I can't use yy p dd p because the dd deletes the line to the clipboard ...
0
votes
1answer
38 views

The form of the cursor in vim in konsole in kde with tmux

I use KDE and for vim in Konsole, I have such commands in my .vimrc: " Konsole " solid underscore let &t_SI = "\033]50;CursorShape=2\007" " solid block let &t_EI = "\033]50;CursorShape=0\007" ...
1
vote
2answers
88 views

Graphical issues in vim

Not sure if this is the best place to ask this but does anyone know why I'm seeing those purple-ish bars in my vim? My vimrc http://dpaste.com/698999/ Also, I'm using Lion OSX
6
votes
2answers
250 views

How can I create my own spelling file for vim?

At the moment I'm writing a document where I need to use a lot of acronyms, technical language, and non German words. Now I was wondering if I could create a spelling file (tech_speak) which checks ...
17
votes
3answers
9k views

Ctrl-s hang terminal emulator?

I came across a sentence in vimdoc: Note: CTRL-S does not work on all terminals and might block further input, use CTRL-Q to get going again. and this key indeed hangs my vim. I was ...
2
votes
1answer
107 views

/usr/bin/vim vs. /bin/vim

I get that binaries can be in different places. What I don't understand is why when I run whereis, which and type it says vim is at /usr/bin/vim, but when I try to run it using sudo it says I can't ...
1
vote
0answers
32 views

Gbrowse not working correctly on MAC

I'm using vim and have installed Pathogen and vim-fugative, but when editing a file under source control on github.com I use the command :Gbrowse and nothing happens. I've tried most of the advice I ...