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

How to disable HTML checking in vim?

I'm getting this HUGE message every single time I save an angular template (which is saved as a .html file): |1 col 1| Warning: missing <!DOCTYPE> declaration |1 col 1| Warning: inserting ...
2
votes
1answer
104 views

How to change the way that vim displays collapsed/folded lines

How can I change the way that vim displays those collapsed/folded lines? I would like it toshow hidden line numbers at line tail but not the head. I have googled and searched vim wiki but found no ...
2
votes
1answer
40 views

Ctrl-A not working in vim command line mode

In vim command mode, while i am typing a really long search and replace command, how do i go to the beginning of the line? Ctrl+e and Ctrl+w are working. But when i press Ctrl+a it just prints ^A. ...
0
votes
2answers
36 views

Copy selection only in visual mode VIM (no gui vim) to system clipboard

Is it possible? Every solution I've found online somehow doesn't meet one of the following criteria: vim, no macvim osx only visual mode only (for copying at least) must be able to copy only ...
0
votes
2answers
84 views

I want to record a keyboard typing as though a human is typing [closed]

I am recording screencasts on OSX and Linux, and I am trying to set up some way to speed up recording of typing long blocks of code. I need a way to take scripts or macros that I generate, and have ...
5
votes
2answers
496 views

“file” command yields “ASCII text, with no line terminators”, unless I first edit the file in vim

I am experimenting a strange behaviour which I don't know how to solve. I will explain the scenario: From a Python script I'm getting a json from a simple application hosted on parse. Once I get ...
2
votes
1answer
63 views

Run vim command from the command line

I need to do the following in several files: dt{%lx:wq, i.e., delete to the first { find the matching } delete the next character save and exit how do I do this from the command line without ...
0
votes
1answer
29 views

After “:set paste” executed “insert mode's remaps” stop working - VIM (iTerm2)

I have this remaps in my .vimrc inoremap <C-d> <C-o>de inoremap <C-k> <BS> inoremap <C-l> <ESC> inoremap <C-j> <CR> They does work great, but after ...
0
votes
0answers
18 views

numpad keys mapped to letters in vim

I'm trying to get my numpad to work in vim. I'm using centOS. When I try to use the numpad, the keys are mapped to various letters: 1=q 2=r 3=s 4=t ... 9=z NOTE: I am not using PuTTY. I've ...
1
vote
3answers
129 views

vim in ConEmu - strange issue during scrolling

I have a problem with colors when I scroll the page. Check the below gif: This is a minimal vimrc to reproduce this: https://gist.github.com/lkurylo/f6a20801b48133a71fac With the configuration for ...
0
votes
0answers
33 views

How to script `Ctrl-O` and `Ctrl-I` in Vim?

How can I script Ctrl-O or Ctrl-I in Vim, so that it jumps to all earlier buffers whether 'buflisted' or 'nobuflisted'? (Note: exe "normal! \<Ctrl-O>" per my experimentation jumps only in ...
1
vote
1answer
59 views

How can I take control over jumps `Ctrl-O` and `Ctrl-I` in Vimscript?

Is there any way I could use Vimscript to go through the list of jumps Ctrl-O, Ctrl-I and to pick the previous jump buffers/positions? Any suggestion is greatly appreciated.
0
votes
2answers
48 views

How to disable search pattern syntax highlighting in VIM

I ssh to a server then sudo to get root. In the shell my cursor blinks as a yellow block. When I open a file with vim if the text is the same color as my cursor the whole word is blocked out in ...
0
votes
1answer
25 views

Is there a way to insert a count of elapsed minutes in vim?

I have a todo.txt file, and I think it'd be fun to be able to position my cursor on a todo item (a line in my todo.txt file), press a key combination, and have Vim start counting the minutes. Then, ...
0
votes
1answer
174 views

vimdiff in Git for Windows gives E810 and E97

I'm using Git for Windows (git version 2.5.3.windows.1) and I've set up vimdiff as my mergetool. Running git mergetool from git bash results in the following error: E810: Cannot read or write temp ...
0
votes
2answers
57 views

Vim: How to highlight every second line?

Is it possible to set up syntax highlighting in vim to highlight every second row?
0
votes
1answer
109 views

Saving from PuTTY (vim) to my local computer

I'm new to SSH stuff, linux, etc, but it's what my University uses for my introductory computer science class. With that in mind, how do I save a file I opened from my University's server in PuTTY ...
1
vote
0answers
17 views

How do I get Dash Doc App to respect indentation on MacVim?

Couldn't do the same as the answer in the question below. How do I get Dash Doc App to respect indentation? Has someone run into the same problem with Vim? -- Edit: I can't reuse the question ...
3
votes
1answer
1k views

Do I really need 4GB of Xcode to run gVim on a Mac OS machine?

I’m using my wife’s MacBook Pro to see if it would be reasonably painless to integrate a MacBook laptop into my Linux workflow. It seems like the main port of gVim to Mac is MacVim which requires ...
1
vote
2answers
75 views

Vim; Shortcut to add comment at beginning of line

When I code, I tend to execute the following manually a lot after having selected multiple lines of code. :'<,'>s/^/#/ I want to add this to my .vimrc but I am having troubles making it work. ...
2
votes
0answers
125 views

VIM: Characters not displayed correctly in GVIM 7.4 on Ubuntu 14.04 LTS

Using GVIM 7.4.52 on Ubuntu 14.04 LTS in a Virtualbox VM. Sometimes the characters are not displayed correctly as can be seen in the following image This totally renders GVIM unusable. The problem ...
2
votes
1answer
64 views

How to insert special characters with zsh line editor?

In vim we can type Ctrl+v then Number in insert mode to insert special characters. This is mostly used to insert control characters. But any characters can be inserted if we know the ASCII number. ...
1
vote
1answer
34 views

Does auto complete work in command line mode(help command) in vim?

Suppose that I am working in a vim buffer and would like to get help on a command that I heard/read about earlier but can't remember now the full name but can only recall the start of the name. Is it ...
0
votes
1answer
111 views

Using vim with Putty results in X server error

I used Putty to remote to Linux machine, and when I use vim to open a file it always delays and display message PuTTY X11 proxy: unable to connect to forwarded X server: Network error: Connection ...
0
votes
1answer
79 views

How can I bind two distinct actions to Ctrl-Shift-Key and Ctrl-Key in vi

I am trying to map two different actions to e.g. CtrlShifta and Ctrla: map <C-S-a> :echo "ctrl-shift-a received"<CR> map <C-a> :echo "ctrl-a received"<CR> But all I ...
0
votes
1answer
42 views

Does resourcing my .vimrc unset the mark created when writing buffer?

The first line returns the cursor to the line i was on, the second sources the resource file. both work on there own but will not work together. The marks set by Return cursor seem to still be set, ...
1
vote
1answer
31 views

Vim Return to last point in file

can anybody provide an explanation as to what this is doing or point me to vimdocs? line("'\"") function! ResCur()$ if line("'\"") <= line("$") normal! g`" return 1 endif$ endfunction ...
0
votes
2answers
66 views

How to make vim to load specific colorscheme automatically?

New to vim here. I'm trying to use vim on OSX 10.10.5. Every time I do vim somefile it opens the file with default colorscheme. My theme file is ~/.vim/colors/customtheme.vim. adding colorscheme ...
1
vote
1answer
81 views

How to get vim syntax highlighting to work?

I cannot get vim syntax highlighting to work on a suse box. I have (only this two lines) in my ~/.vimrc filetype plugin on syntax on If I open a shell script with .sh an do :set filetype? I get ...
2
votes
0answers
38 views

“Atomic” Multiple Substitution in Vim

I know how to do multiple substitutions at once in vim but this only behaves correctly if none of the substitutes match a subsequent item to be replaced. This can be worked around by using temporary ...
0
votes
0answers
69 views

vim - syntastic is highlighting valid syntax

I've just installed syntastic and it's all over the place. Variables are errors, imports are errors, modules don't have dot operator, you name it. What can I do about this ?! (I would've included an ...
0
votes
0answers
29 views

vim C-n Shortcuts with iTerm2 and SSH

I read about similar issues before but I'm not sure it's the same. I use vim on a server through SSH with iTerm2 on my Mac. For some reasons some bindings don't work in vim, e.g. <C-n> or ...
0
votes
1answer
35 views

Vim ~/.vimrc au! FileChangedShell

I put this command in ~/.vimrc. au! FileChangedShell img.dat | r img.dat which also contains set autochdir " pwd is always directory of current buffer I hoped to ensure that, if ...
0
votes
1answer
300 views

How to enable arrow keys on vim used from msysgit bash

I just need a simple solution that will enable the arrow keys in the vim included with Git For Windows. I did found a solution to enable backspace. But no solution for the arrows problem. The arrows ...
1
vote
1answer
245 views

256color terminal flickering in Konsole

I'm trying to setup 256 color mode at work for my Vim setup and it just refuses to work correctly. I'm using Konsole as my terminal emulator and my shell type is tcsh. I found a perl script named ...
1
vote
0answers
139 views

Vim / NeoVim: Map <CR> to <Esc> and <S-CR> to <CR>

I'd like to use enter to escape insert mode, and use Shift+Enter to insert a new line instead. The problem is my terminal emulator (Konsole running under Lubuntu) doesn't capture Shift+Enter (nor ...
0
votes
1answer
209 views

c vim garbles 1st character of file when using via mobaxterm

this thing drives me crazy, and I am unable to find a solution... I am logging in to a FreeBSD machine via ssh using MobaXterm. Every time I open a text file with vim, it replaces the first character ...
0
votes
1answer
107 views

Highlight if-else-endif structures in Vim

Is there a way to highlight if-else-endif structures in Vim on demand based on their 'level' in the overall program hierarchy? I.e. I want something like if <<< highlight in red foo else ...
1
vote
1answer
19 views

Vim: Columising a long line of arrays

In writing tests I often want to compare a generated value to something I've previously generated, but dumping the output from my console into vim leads to a very long ugly line. Is there any way to ...
0
votes
1answer
130 views

How do I make vim use the syntax highlighting of another file location?

I don't ever use sudo vim /path/to/some.file; I always use sudoedit. However, this means that vim doesn't see the correct path. As an example, when I open /etc/http/conf/httpd.conf, sudoedit makes a ...
0
votes
2answers
233 views

Vim: map shift-K to open help on current word in a new tab

In conjunction with http://stackoverflow.com/questions/3131393/remapping-help-in-vim-to-open-in-a-new-tab , I'm looking to also make the shift-K shortcut that opens help in a new tab. I first tried ...
0
votes
1answer
50 views

Vim solarized looks wrong

I have downloaded and set up vim solarized. But I get a weird output: The background of some keywords are slightly darker than the rest, and surprisingly everything else is in bold. How to fix ...
1
vote
1answer
40 views

Vim opens symlink even when given target path directly

If I open a file through a symlink first, then :bd that one and later try to open the actual target of the symlink directly, Vim instead opens the symlink. How do I change this behaviour? The ...
0
votes
2answers
156 views

Is there a way to concurrently edit the same file in two different terminals with vim?

vim has a really cool feature that allows you to concurrently edit the same file in a single vim session. I use the i3 window manager. I like it because it allows me to tile my windows, tab them, ...
0
votes
0answers
32 views

Does VIMProbable have register support?

VIMProbable is a browser that works using vi keys. Does it have support for storing text in registers?
10
votes
2answers
679 views

How to read Vim keystroke syntax?

I'm trying to learn Vim and I'm seeing a lot of documentation use syntax like <C-v>. Is there a general guide on how to read this correctly? I've attached an example SO post below that uses ...
0
votes
0answers
217 views

Creating an alias for in fish shell: The file 'vim' is not executable by this user

I'm trying to create an alias for vim to execute vimx. After creating a new terminal when I try to auto complete vi, I get the following error: fish: The file 'vim' is not executable by this user ...
2
votes
1answer
121 views

How come terminal vim take so long to open HTML files?

I've been using terminal vim with custom plugin for a long-time. I never can wrap my head around this, I've been searching the web for a few days but had no luck. I do a lot of web development, I use ...
0
votes
0answers
12 views

Cross-platform .vimrc/_vimrc [duplicate]

I use vim on windows (GVim portable off a USB stick) and Linux (standard command-line vim) and would like to synchronise my settings (_vimrc or .vimrc respectively). As far as I can see (I haven't ...
0
votes
1answer
21 views

Pathogen not loading all bundles in Windows

I'm trying to load two VIM plugins on Windows 7 x64 using Pathogen. The plugins are NERDTree and vim-ipython NERDtree loads but IPython doesn't and I'm not entirely sure why. Any tips would help. See ...