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
1answer
85 views

Remove any leading spaces (not including tabs)

I'm trying to remove leading spaces in vim but not touch tabs. For instance, if each of the lines below have a leading tab, but b_line has an additional two spaces, how can I just remove those two ...
0
votes
0answers
34 views

vim pre patched fonts doesnt work in powerline

I've installed gvim and powerline plugin. I downloaded pre patched fonts and did everything like the readme file says and still got that weird looking fonts in powerline. I cleared the cache, even ...
0
votes
0answers
59 views

Setting up Eclim with Git Bash Windows 7

So I followed the instructions to get Eclim working on command prompt and it works, I can use the command :PingEclim and it gives me the relevant information when im running eclimd.bat. So all is ...
0
votes
2answers
37 views

Vim causing auto compile on file write

I recently installed some plugins on vim, and since then every file write is triggering a build process, showing errors in the file (here's a C++ file): The problem is, I'm pretty new to vim and am ...
0
votes
0answers
28 views

Vim in Cygwin skips keypresses

My Cygwin installation works fine except when I code in vim, it skips the keys I press, and it happens annoyingly often. I don't seem to have this problem when I am in the bash, but when I start ...
2
votes
0answers
83 views

Windows gVim, shell starts in HOME instead of working directory

I've recently have gotten sick of constantly switching between Windows and Linux and installed gVim and MSYS2 on Windows 7. After a couple hours of searching I have a .vimrc that makes !command, make, ...
0
votes
1answer
20 views

vim user defined command: reopen current file for editing

I have a user defined command in vim that does a chmod on the current file. Once that's done, reopen the current file for editing (with the newly updated properties) by issuing: :e[dit]! I'd like ...
0
votes
1answer
24 views

Restore previous vim window height

Many windows in vim can are opened in some predefined layouts (e.g. copen or :Gstatus). However, further layout changes will disrupt original widow height. I often end up with windows of height 1 or 2 ...
2
votes
1answer
56 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
49 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
92 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
46 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
35 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
75 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
22 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
60 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
56 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
77 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
140 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 ...
3
votes
2answers
59 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
88 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
609 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
81 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
31 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
152 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
35 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
72 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
51 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
212 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
67 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
121 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
18 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
85 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
142 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
84 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
41 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
127 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
84 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
73 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
97 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 ...