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

Terminator/vim Mouse Issue

Let me start off with saying that I do try to use the mouse in vim as little as possible, but there are times that I will end up using it to click around or highlight something. With that said, ...
1
vote
1answer
21 views

How to keep Vim's visual mode selection while scrolling with Ctrl-F?

When I select text in Vim's visual mode, scrolling with Ctrl-F cancels the selection. How can I keep the selection while scrolling (with Ctrl-F)?
1
vote
1answer
13 views

vim finding all extensions associated with a filetype

How can I find all file extensions that will use specific filetype (highlighting)? For example I know that both ".xml" and ".xmi" files will by opened as "xml" filetype, however I would like to find ...
-1
votes
1answer
26 views

Print tag folder in vim

I got this line in my .vimrc so that it look i parent directories untill it find a tag file. set tags=./tags; Is there a way to print the directory where vim found the tag file inside vim?
3
votes
1answer
154 views

Show current file size in vim editor

I'm heavily using Vim to edit and work with my files, now I'm starting to open big files and it would be useful to see the file size directly from VIM itself. Is there a way to show the current file ...
0
votes
0answers
18 views

Can I make vim highlight argument _names_ in C/C++ prototypes?

Can I make vim highlight argument names in C/C++ prototypes? Doesn't need to be perfect (handle function arguments, etc.).
0
votes
1answer
54 views

Moving lines between split windows in vim

I have two files, say a.txt and b.txt, in the same session of vim and I split the screen so I have file a.txt in the upper window and b.txt in the lower window. I want to move lines here and there ...
1
vote
2answers
50 views

Can't copy certain gvim text, eg :version or error messages

Generally, my copy/paste works just fine in vim. However, when I type :version, my mouse pointer becomes a symbol like: While I can select text, I can't copy it to the clipboard. Exactly the same ...
1
vote
2answers
50 views

How to purge all tabs for spaces in all C files in a directory?

I'm trying to fix the style in a directory of about 60 .c and .h files. This can be taken in steps (e.g. I don't have to figure out find and vim script syntax at the same time), but ultimately I want ...
0
votes
1answer
111 views

Solarized in Konsole + tmux + vim

Solarized color scheme works fine when using Konsole + vim, but I can't figure out how to properly configure my computer for a Konsole + tmux +vim usage (please see screenshots on the links). Below, ...
2
votes
1answer
22 views

Folding specific sections of code in vim

I'm wondering if it is possible to automatically fold only specific sections of code in vim (specifically for python files). I'm currently using the indent fold method. And I would like to only fold ...
1
vote
1answer
58 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
33 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
50 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
27 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
69 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
18 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
21 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 ...
1
vote
0answers
39 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
36 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
42 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
78 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
42 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
29 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
59 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
54 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
52 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
74 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
82 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
37 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
35 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
79 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
448 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
55 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
116 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
32 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
56 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
47 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
161 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
54 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
99 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 ...