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

2
votes
1answer
54 views

Why does `zsh` insert a `~` when I press the delete key?

I have set my zsh to use vim style for editing command lines. However, when I use the Delete key, it inserts a ~ character. Have I misconfigured my zsh? How do I turn this off? Do I need to go ...
0
votes
1answer
45 views

Open the folder on the cursor with another application NerdTree

I'm using NERDTree, it would be awesome if, when I'm with the cursor over a folder, I had a way to call my file manager, say thunar, whit a mapping to open that folder. Like Sublime does.
1
vote
1answer
49 views

iTunes misinterpreting subtitle character encoding

I am attempting to use Turkish subtitles for a movie I recently bought on iTunes, except iTunes is interpreting the subtitles as if they were encoded with ISO-8859-1. I believe the correct encoding ...
1
vote
1answer
88 views

How can I get vim autocompletion working in iTerm

I recently switched from MacVim to regular Vim in iTerm. I've been encountering an issue where I can't get vim's autocompletion to trigger using Ctrl-N. Instead, I get iTerm's autocompletion which ...
1
vote
1answer
45 views

How do I get vi-style line editing in Vim command mode?

When typing a command with ":" in Vim, I often find myself hitting escape and/or trying to navigate with h,j,k and l or trying other vi-style key combinations to edit the command I am writing. I have ...
0
votes
0answers
34 views

Vim Background color issue

I want my vim background to be dark but as you can see it's not, its half black half grey, I'm using Ubuntu 15.10 with latest Vim version. How to fix this?
1
vote
0answers
69 views

.vimrc sourcing another leads to plugin errors

Since vim or vim-pymode does not seem to work with both python 2 and 3 at the same time I thought I make an alias for my newly compiled vim version specially for developing python 3. So I added this ...
0
votes
1answer
21 views

Converting from vim search to sed

I have a long Latex document with many sections. I'd like to check that all sections of the document are filled in. So I search for any time there is a '}' ending a section title, somewhitespace, and ...
0
votes
1answer
59 views

vim/xterm: thin vertical highlighted bars on some lines at extreme right side of screen

I use vim in an xterm. Just recently I have noticed the appearance of thin vertical highlighted bars on some lines at extreme right side of xterm. They are not tied to the text, for they remain in the ...
1
vote
1answer
30 views

How can I treat a logical block as a text object in Vim?

Here's a situation I'm in every day: 0 .outer_selector { 1 2 .inner_selector { 3 margin: 0; 4 padding: 0; 5 6 input { display: none; } 7 } 8 9 } Now I want to cut and paste the ...
0
votes
1answer
14 views

editing after searching in vim

if I search from command mode by typing /something I am shown that word in my open buffer, but then I can't delete chars by hitting d or replace with r, these just add more letters to the search term ...
1
vote
1answer
55 views

Remap Control+Space to behave like Return (enter key), compatible with vim

How can I map Control_L + Space to Return? preferably to be done with xmodmap. I did trying to search for some answers but with no success. My current solution is: ~/.Xmodmap keycode 65 = space ...
2
votes
2answers
76 views

How to extract specific lines from large .txt file based on search pattern

I am using Windows 7 64 bit I have large .txt (800 mb plus) file containing following formate the file is space separated 8232394 06774483 N 19850910 19870818 19910818 EXP. 8309716 06774483 N ...
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
126 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
45 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
38 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
86 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
541 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
73 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
20 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
138 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
64 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
49 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 yellow....
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
189 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
62 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
115 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
2k 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
79 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
136 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
74 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. E.g....
1
vote
1answer
39 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
119 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
80 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
34 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
71 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
88 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
39 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
72 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
31 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 <C-...
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
323 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
252 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
146 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
229 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 ...