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

Why does mapping <ESC> start command line Vim in Replace mode?

I was having an issue where starting Vim from the command line was starting in Replace mode. I finally narrowed it down to this line in my config: nnoremap <ESC> ...
0
votes
0answers
9 views

“Cmd”+“Shift”+“N” works in MacVim but not terminal VIM

I use iTerm2 on Mac OS X 10.10 (Yosemite) and I installed YADR and that comes with all its configurations and mappings. One of the mappings maps Cmd+Shift+N to NERDTreeToggle. This however works in ...
2
votes
1answer
32 views

How to push the original line down after copy and paste in Vim?

I just started with Vim recently and I got stuck with a basic problem! When I want to copy and paste more than one line of my codes and paste it in the other place, the original codes will not move ...
1
vote
1answer
19 views

Vim: Change color of window counter in tab line

How do you change the color of the window counter that VIM displays in the tab bar. I'm familiar with how to set highlighting on groups, what group applies to it? Below is an image of a vim session, ...
0
votes
0answers
18 views

What is this? Debian Wheezy, Weird randomly occuring inputs

When I login in one of the extra virtual terminals there always come odd signs or control characters between my actual input. For example I type administrator and after the adm some garbage gets ...
0
votes
0answers
17 views

Vim and TMux keys coexits

I am configuring vim and tmux. I configured the tab navigation in vim like this: map <M-Left> <Esc>:tabprev<CR> map <M-Right> <Esc>:tabnext<CR> map <C-T> ...
0
votes
0answers
31 views

How to embed Vim commands in text files to run when the file is open? [duplicate]

I remember that there is a way to run vim commands when a certain file (not type) opens and done through putting some vim stuff in the file but I cant remember what it was. I am not talking about ...
0
votes
0answers
37 views

Can vim be used to view a growing file?

I often use vim's view for viewing files. Is there a way to use it for a growing file so that I can see the progress as it's happening? Something similar to tail -f or less +F I have two use ...
0
votes
0answers
21 views

Vim: mapping for <PageUp>, <PageDown> not working in vim, but working in tmux

Did a clean install a couple days ago, copied over my .vimrc and .tmux.conf, and now Ctrl-F / Ctrl-B doesn't page down / up in vim. Ctrl-F / Ctrl-B work in tmux when selecting text. Weirder still, ...
3
votes
2answers
81 views

Like the J command in Vim, but take a motion

I like the J command for joining many lines, but don’t like having to count how many lines I want to join. I’d prefer to give a motion. This can be faked with V{motion}J; is there a way that doesn’t ...
0
votes
2answers
30 views

Gvim: Disable alt-letter behaviour inserting accented/unicode chatacters?

I was using alt-j, alt-l, alt-i and alt-k to go to the beginning/end/top/bottom of the current line. Over the years I noticed there's so much stress on the alt key, so now I decided to go try other ...
1
vote
1answer
30 views

How do I change the hilighted length of git commit-messages in vim?

I'm of the opinion that the orthodox 50-character limit on git commit messages is absolutely ridiculous. (Primarily because I think using an 80-character wide Terminal in 2015 is equally ridiculous.) ...
1
vote
1answer
32 views

Vim: changing tabs to spaces

I know this question has been asked many times, but I'm not finding a solution to my problem in particular, mostly because I can't even really identify the problem. Here's the timeline of events: ...
0
votes
2answers
43 views

Vim | Can I Insert .gpeg and .gif images in my Vim Files?

Well I am new in Vim. So learning while working using Vim. I am currently learning Kivy (A Python framework) and taking some notes using Vim. However sometimes I need to save pictures (like .jpeg, ...
0
votes
0answers
24 views

Getting CTRL+V to work in Vim inside Conemu

Conemu uses CTRL+V as the short cut to “paste first line of clipboad.” I want this functionality when I’m interacting with the command-line, but when I’m in Vim I’d like Vim to handle it.
0
votes
1answer
39 views

after SSHing into another machine and starting vim, run terminal command in original terminal

I use ssh to remotely login to a machine where I subsequently work primarily from Vim. Sometimes I want to run some shell command on my original machine without leaving Vim. What is a non-disruptive ...
3
votes
0answers
34 views

How to provide user “hints” to “diff”? [closed]

Sometimes, when I am diffing two text files (usually in vimdiff), the diff algorithm gets confused and associates the wrong lines with one another. Once that's happened, the rest of the diff is often ...
0
votes
3answers
33 views

VIM How Can I Force VIM to Arrange Words According to My Choice?

Well I am writing and learning. I just want to write some text in this way.... - First line. Second line. Third line. But the problem is the lines are starting in this way... - First line. ...
0
votes
3answers
38 views

How to concatenate pairs of cells; every second cell to the first

How to concatenate successive pairs of cells in a column, adding the second cell of each pair to the first. For example: santhosh kumar sagar sv sai deva And the result should be: santhoshkumar ...
1
vote
0answers
18 views

Tmux 1.9a - variable #{pane_current_command} doesn't work as expected

I'm trying to get vim-tmux-navigator to work on my my Cygwin (Win7 x64) + Tmux 1.9a but it doesn't. The reason is the variable #{pane_current_command} always returns bash instead of vim, so the ...
0
votes
0answers
17 views

Mouse works erratically/intermittently over remote SSH

I work remotely sometimes. I’ll use Vim inside a Screen session, over SSH. I use the mouse in Vim. Sometimes the mouse breaks. One of these things happens: Random characters get inserted into my ...
1
vote
0answers
26 views

vim leaves a swapfile after crash with unknown owner

I am running Cygwin on windows. Several times now I've had a swap file left behind from vim after a crash, but it can't be recovered or deleted. "ls -l" shows this: -rw-r----- 1 Unknown+User ...
2
votes
0answers
37 views

Mouse click only works once with iterm2/tmux/mosh

I'm trying to set up iTerm2 + mosh + tmux to do my remote work. I can get everything to connect up, but for some reason, the mouse response is funky. If I split my tmux window so I have two panes and ...
1
vote
2answers
31 views

how to set .vim color scheme to vim editor OS X

I downloaded some .vim color scheme files in github and moved them by sudo mv ~.vim /usr/share/vim/vim73/colors then I wrote colorscheme ~.vim in vimrc. The original schemes already existed, are ...
1
vote
2answers
31 views

Make :Wq equivalent to :wq in vim

I'm always typing :Wq when I mean :wq. Is there a way to alias :Wq=':wq' in vim?
0
votes
3answers
50 views

Installing a vim color scheme

After some research, I've discovered that in order to properly install you need to create a .vim directory inside of the path represented by the $VIMRUNTIME variable from this StackOverflow post. When ...
0
votes
0answers
31 views

gnu screen not to change my window titles

I set meaningful names to new windows I create in gnu screen, but then when I 'cd' or open vim that name gets changed to 'pwd' for instance. Is there a way to prevent screen from changing the title? I ...
0
votes
0answers
19 views

Jedi vim autocomplete fails

After installing jedi-vim with Pathogen, I noticed that several features weren't working correctly. To test the behavior of jedi-vim, I copied the 2nd code snippet featured in the demo at the demo for ...
1
vote
2answers
36 views

Vim Avoid “Hit the enter key or enter a command”

I have the following configuration in my .vimrc file to switch between a .c File and it's corresponding .h File function SwitchHeader() w if(&ft=='cpp') e %:r.c ...
0
votes
1answer
40 views

Scroll in terminal while Vim is running

When I open vim in some terminals (on mac for example) and use the mouse scroll, I am able to see the terminal output again. If my terminal window would look like this: user@pc$ "I'm gonna start ...
2
votes
1answer
23 views

Effectively manage sets of Vim settings

Is there any effective way to manage multiple sets of Vim configuration? I need this because I need different sets of configuration for different types of work. It depends a lot whether I'm writing a ...
0
votes
1answer
37 views

How to I map “Ctrl + g” to open NerdTree

I use vim at work, but we have an IT guy who installed a bunch of magical plugins for vim on my work laptop so that now when I try to open vim on my home laptop, I am completely lost because I don't ...
0
votes
0answers
16 views

saving/:w a python file in gvim is creating two of the same files with different extensions [duplicate]

When I first :w test.py My file saves on my desktop with a picture of a python script and the file type is shown as Python File. Now when I go to save my file without including the name as in :w a ...
0
votes
1answer
27 views

determine what changed the mapping of system command like dd - vim

This morning something, I suspect a function call, changed the mappings or actions for system commands like dd , e , j etc. dd moved horizontally, 'e' moved down a line and j and k moved horizontally ...
0
votes
2answers
38 views

Jumping to function in Vim

I have ctags and I would jump to functions by placing my curson to a function and pressing ctrl ]. However, I find this sometimes to be inconvenient. For instance, if my cursor is nowhere near a ...
0
votes
1answer
32 views

Vim `cpp` Syntax highlighter prematurely ends macros mid-word

FINAL EDIT: I have "manually migrated" this question to the new Vi(m) SE site: http://vi.stackexchange.com/q/2219/1060 My Vim syntax highlighter for ft=cpp is prematurely ending some macros ...
0
votes
0answers
69 views

gvim (version 7.4.52 and 7.4.622) doesn't refresh properly on Ubuntu (14.04 LTS)

The problem is happening on Ubuntu 14.04 LTS running Unity desktop under vmware on Windows 7 host. My gvim is sometimes not refreshing its display unless I force it to using Ctrl+L. For example, when ...
2
votes
3answers
133 views

Adding parenthesis around highlighted text in Vim

Is there a functionality in Vim that allows parenthesis to be added around the highlighted text? For instance, if I highlight n = getchar() in if (n = getchar() == '\n'), I would want to put ...
1
vote
0answers
68 views

VIM paste error: E353 nothing in register “”

I just installed Ubuntu 14.04 and got my vim set up and I have run into a slight caveat and I am not sure why it is happening. When I try to paste something with the middle mouse button, I get: ...
-3
votes
1answer
25 views

Configure command line look in Vim

Is it possible to change the default Vim command line look when you are in some buffer to see some valuable information? How? What Vim help page corresponds to these options?
2
votes
1answer
60 views

How can I get Syntastic to recognize newer Ruby syntax?

I'm using Syntastic in Vim, and it highlights newer Ruby syntax as errors. For example, if I use required keyword arguments (introduced in Ruby 2.1), like this: def distance(from:, to:) # whatever ...
0
votes
0answers
17 views

vim gets stuck at top or bottom

When I scroll to the top or bottom of a document using a pressed j and k, vim temporarily gets stuck (around one second) as if it has to finish clearing the keyboard buffer. Can I correct this issue ...
1
vote
1answer
92 views

How to “Edit with Vim” as administrator in Windows?

When you install gvim in Windows, you get a right-click Explorer context menu item: "Edit with Vim". Is there a way of either adding a "Edit with Vim as Administrator", or just changing the existing ...
0
votes
0answers
28 views

Can I get vim to install bundles and close in the background?

I've been playing around with Dockerfiles, and in setting up a development environment, there is one manual step I haven't been able to work around yet. To install the bundles in my vimrc, I have to ...
0
votes
1answer
20 views

Vim macro: increase last number of a line by 1

I have a csv file whose last column contains either integers, or the character "-". I need a vim macro that does the following: If last element of current row is "-": Turn "-" to "1" Else ...
1
vote
1answer
44 views

$HOME is not defined for root user on Ubuntu 14.04

On a fresh Ubuntu 14.04 install, the bash environment for the root user does not have $HOME defined. I need to run some apps from a root shell, for example: gdb /usr/sbin/apache2 This is difficult ...
1
vote
1answer
23 views

How can I create a macro to compile a CoffeeScript file I am editing from inside VIM?

I am writing a lot of CoffeeScript in VIM and I compile it very frequently by typing : coffee -c %. How can I easily create a macro so I don’t need to keep typing this?
2
votes
1answer
33 views

Can I make Vim's fold indicators visually subtler?

Fold indicators in vim are prominent because they take up the entire window width: void foo() { +--- 10 lines: int x;----------------------------------------------------------- } which makes ...
0
votes
2answers
77 views

Strange Vim/terminal use from ssh via Mac OSX

I am using terminal from a Mac OS X 10.10 (Yosemite) and SSH’ing into a fedora machine and am having a couple strange issues with the terminal: When I :q from vim, the contents of the vim screen is ...
2
votes
1answer
23 views

Check if vim is compiled with +X11 in .vimrc

I have two copies of vim installed. One is installed with macvim and necessarily configured with -X11 (to work with Cocoa), while the other is configured to +X11 (used in terminal, to work with a ...