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

“Git commit” takes a very long time (> 40 seconds) to open vim. What could be happening?

When I run git commit -m 'some commit message', everything works as expected. When I run vim on its own, everything works as expected. Yet when I run git commit, which launches vim, it takes up to 40 ...
0
votes
0answers
36 views

Vim boilerplate (automatic, file specific) [duplicate]

There is a bit of code that I want to include in a variety of files done with vim, and I don't feel like copy-pasting every time. The example that I want to accomplish the most is vim newfile.tex ...
0
votes
0answers
35 views

How can I use VIM with remote files?

I've tried googling but all I find are terrible tutorials that end up not being compatible with VIM that are out dated or require me to manually upload every single time instead of letting me work on ...
0
votes
2answers
204 views

How to point MacVim to the right perl on OSX 10.10?

When I try to use MacVim from the command line, I get dyld: Library not loaded: /System/Library/Perl/5.12/darwin-thread-multi-2level/CORE/libperl.dylib Referenced from: ...
0
votes
1answer
92 views

How to map ctrl/p clear cache and refresh NERDTree root node?

How do I map <leader>r which clears CtrlP's cache and refreshes NERDTree's root directory? Pseudo code, I have: map <Leader>r :CtrlPClearCache<cr>g:NERDTreeMapRefreshRoot<cr> ...
11
votes
3answers
876 views

How to break long lines in vim?

I have a quite big text file formed of blocks like Short line. Really long line. Short line. separated by empty lines, and I would like to use vim (on Linux) to break down the long lines and obtain ...
2
votes
2answers
57 views

How can I get a list of all misspelled words in a text using Linux?

I have a text that has a number of misspelled words. I'd like to get a list of all those words, so for a text like this: This is just a normall line with some speling mistakes in it. It would ...
1
vote
1answer
30 views

Is there a clean way to quit evim?

While fiddling with installation of vim and gvim from source, trying to release console-based vim from X dependencies, I tried to run evim to see what it is and whether it should be freed from X ...
1
vote
1answer
399 views

Solarized Dark + Gnome Terminal + Vim + Vim-Airline

I installed the solarized dark theme for gnome terminal using https://github.com/Anthony25/gnome-terminal-colors-solarized and then with Vundle installed ...
1
vote
0answers
47 views

How can I find out the encoding of this corrupted Chinese text, which an online tool fixes correctly?

I have a text in Simplified Chinese, which, when read as UTF-8 begins with ´ÓºÜ¾ÃÒÔÇ°¿ªÊ¼, which the online tool from MandarinTools (first search result for Repair Corrupted Chinese Email) fixes to ...
1
vote
1answer
40 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
1answer
20 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
42 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
34 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
30 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
65 views

How to make Vim and TMux keys coexist?

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
33 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 ...
1
vote
0answers
46 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
38 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
90 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
51 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
71 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
53 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: ...
1
vote
2answers
163 views

Can I insert .jpeg 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
69 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
60 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
41 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
40 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
41 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
70 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
22 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
44 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
162 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
48 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
43 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
73 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 ...
1
vote
2answers
103 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
37 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
64 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
52 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
28 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
110 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
28 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
56 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
56 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
157 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
203 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
232 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
28 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?