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
2answers
29 views

Disable vim plugins for large files

I have a custom Vim configuration that I've been putting together. There's a number of cool plugins and features that aid in PHP development. However, when I open a large file (couple thousand lines) ...
0
votes
1answer
10 views

sourcing the .vimrc gives E174 error

I am using vim on a Mac os X. After editing my .vimrc file and I want to try to reload it without restarting vim. But it gives me the following error. E174: Command already exists: add ! to replace ...
1
vote
1answer
20 views

Firefox — How to open a link (to any text-based file) in Vim?

Rather often, I see web pages with links to files that I want to open directly in gVim (when browsing with Firefox on Windows). Chrome-specific answer — also good to have. Attempting to get this ...
0
votes
1answer
32 views

remove spurious ending spaces when copy pasting from emacs console mode?

I'm not really sure where this comes from but it's really annoying: Using emacs in console mode, and when I want to copy from emacs and paste to another application (possibily another term) I often ...
2
votes
1answer
33 views

why is vim calling this script on startup?

I'm trying to use a custom color scheme. On startup, I can see that vim is loading my scheme, but after that it loads another scheme, overwriting mine. Here's the output of :scriptnames: 1: ...
0
votes
1answer
26 views

Vim yank to tmux clipboard

I see a lot of explanations of how to make vim copy to the system clipboard (involving xclip for linux or pbcopy or OSX), but I would like to yank to the tmux clipboard. To be clear, what I want is to ...
1
vote
1answer
14 views

autocommand BufRead not working in vim when saving an empty buffer

I'm trying to use autocmd to get some filename-specific mappings. I followed some instructions online and write the following thing in my vimrc: autocmd BufRead,BufNewFile special.txt (some mappings ...
0
votes
0answers
24 views

.dotfiles gitignore not ignoring vim/tmp folder

tmp=.dotfiles/vim/tmp.GITIGNORE=.dotfiles/.gitignore. I have created a gitignore for vim/tmp inside my .dotfiles but they are not being ignored. My temp folder contains /backup/swap/undo/ and every ...
0
votes
0answers
10 views

Is there anyway to map cscope's key binding to something else?

I love opening windows in a new vertical split. Right now with cscope I have to use Ctrl SPACE SPACE g to do so. How can I map Ctrl Space Space to Ctrl \ or some other mapping?
2
votes
1answer
32 views

gVim: Pathogen not loading plugins properly (Windows)

I'm using gVim 7.4 on Windows 7 x64. When I place a plugin in the bundle folder, the plugin's commands don't seem to be registered. My setup is as follows: gVim is installed at C:\Program Files ...
0
votes
1answer
34 views

Why does vim open network connections to a process owned by another user?

I just noticed something really weird... When I run lsof of my vim process I see connections to port 6013 of a process owned by another local user. I wonder where they might come from. I trust the ...
0
votes
3answers
63 views

VIM - How to Bold, Italic, Underline and Hypertext Specific Words?

I am new in VIM. I am writing some files using VIM. I did enough research but didn't get the answer anywhere! I just wanted to know how can I Bold, Italic and Underline a word in VIM. Also I want to ...
0
votes
1answer
17 views

How do I open multiple files as part of gVim's launch procedure?

I use gVim a lot in Windows at work to edit text files. I want $VIMRC to always be in buffer 1, and my vim_cheatsheet to always be in buffer 2. I tried putting "e $VIMRC" in my .vimrc, which didn't ...
0
votes
1answer
19 views

Keyboard modes like modes in vim

I'd like to be able to hit capslock and have many keyboard mappings change. j would be mapped to downarrow, k to uparrow etc. like the basics of command mode in vim. Then I'd be able to navigate a ...
0
votes
0answers
25 views

My dot files are version controlled. Can I add sub-modules with Vundle or Pathogen?

I have my .dotfiles version controlled. With symbolic links to .vimrc, .bashrc and .vim. I have recently needed to add some VIM plug ins, command-t and YouCompleteMe. Having looked in to Pathogen and ...
0
votes
2answers
38 views

Why is the cursor flashing at the end of the line in gvim?

I recently started using vim/gvim and I have this really annoying problem where cursors flashes at the end of the line with every character I type in insert mode. Take a look at this video and you'll ...
2
votes
2answers
26 views

syntax on, syntax enable, vim

I am trying to find out how to make vim to remember the syntax enable command so I don't have to type it every time I open a new .c file. I bet there is a way, I tried looking at the documentation for ...
0
votes
0answers
32 views

How do I make vim not beep when autoinserting new lines?

Whenever I'm typing something like function(){|} (cursor is at '|') and hit ENTER, vim automatically drops me to the next line and autoindents, but it always beeps at me. Why does it beep and how can ...
1
vote
1answer
24 views

Vim NERDTree not working

Encountered a strange bug. I cannot open directories/files in NERDTree when I double click or press o. Any help is appreciated.
0
votes
1answer
45 views

Installing vim syntax highlighting for C++11\14

I have a fresh installation of Manjaro linux 0.8.10 with vim 7.4 installed, and I'm unsuccessfully trying to enable syntax highlighting for c++11/14 using the script by Michael Small (which I've been ...
1
vote
1answer
17 views

How to adjust statusline height in MacVim?

I just installed powerline for mvim. It works fine except my statusline is a bit too big which makes it look weird: How can I fix this?
1
vote
1answer
124 views

Customize Vim to have border on horizontal split

I am always using multiple windows to edit multiple files. I can style my Vertical Split with highlight VertSplit cterm=none gui=none But what about styling horizontal split? I want it to have ...
0
votes
0answers
22 views

Vi scrolling in Firefox/Chrome

Is there a way to rebind j and k to scroll pages in Firefox or Chrome, or addons available just for vi-like scrolling that aren't entire emulators like vimperator and vimium? All I want to do is ...
0
votes
0answers
22 views

Emulate arrows in a vim-like manner in Linux

I use gVim. Also vifm, vimperator, zathura and Terminal in vi mode. Is there any way to map Ctrl+H,J,K,L to arrow key presses to make vim-like Linux? I want to work in all applications in vim-like ...
1
vote
0answers
24 views

NERDTree: open file in current window?

When I open a file in a NERDTree buffer that was created by opening a directory, when I press <CR>, it opens the selected file in the current window unless the file is open in another window, in ...
1
vote
1answer
24 views

`vim` and `YouCompleteMe`

I installed vim with python support from source. Then I used Vundle to install YouCompleteMe with the option --clang-completer. No other plugin is additionally installed by me and the clanglib is up ...
0
votes
0answers
27 views

vim leaving empty display on exit

I'm on OSX using zsh and vim clears my screen on exit, unlike less or man and other applications. When I exit vim, the next command prompt is on the very bottom of the screen, leaving empty lines ...
0
votes
1answer
18 views

How to change Audacious keyboard controls, preferably to Vim-like?

I couldn't find a suitable plugin, there is also nothing in ~/.config/audacious. What could I possibly do to change controls? For example, I'd like to have the following: j - move down the ...
0
votes
0answers
50 views

Strange behaviour of vim inside of gnu-screen

I use screen a lot and inside one of my screen windows, I use vim a lot. I have, however, sometimes, some strange behaviour of vim: After a while of using vim and switching forth and back between ...
1
vote
2answers
27 views

Updating the emacs style Time Stamp comments in vim

How can I implement this emacs auto time stamp in vim? I have the following string at the top of a file: // Time-stamp: <> Here // are comment characters. What do I need to do so that ...
0
votes
3answers
19 views

gVim closes automatically when opening python file

I'm using gVim 7.4 , it was running smoothly before installing Plugins after installing pathogen gVim window closes automatically when opening python files. It's working fine for other files except ...
0
votes
0answers
25 views

How to change key binding for backward search in VIM?

I am using VIM 7.2 remotely (in a server), and when I try to hit the question mark (in insert mode) it exits insert mode, and prompts for a backward search. In short, I can't type ? as plain text ...
1
vote
2answers
88 views

vim: library of common substitutions without plugins?

I would be wanting to perform thinks like :'<,'>s/^\ \ \ \ // in an abbreviated form, like :'<,'>s_lw (no matter what would actually be that s_lw) using vim base functionality, initially ...
0
votes
0answers
43 views

Why is my Gvim font so ugly and grainy under Windows 7?

I use Gvim on Linux and Windows. On Windows 7 Gvim just looks ugly. Mainly because of the font. The fonts looks very grainy and poorly rendered. I tried a few different fonts. ...
1
vote
4answers
62 views

Select all matching text in Vim?

I have a bunch of data, and I want to yank everything that matches the following regex to a register : /'user': '[a-Z]*' Is there any way to copy all the matches to a register in vanilla vim? I've ...
0
votes
1answer
28 views

Strange backspace behavior

In both command line vim and gvim alike, I have a situation where the backspace functionality behaves like some of my old vi experiences. If I press backspace in edit mode, the character is not ...
1
vote
2answers
26 views

How do I add a regular expression to a mapping command in vim?

I want to map :b<buffer_number><cr> to <leader>b<buffer_number>. I have: nmap <leader>b :b which is not enough, because I still have to press Enter. I also tried: ...
0
votes
1answer
23 views

How to bring vim back to foreground in Powershell

launch vim from powershell hit control+z (you are dropped back to powershell, vim is in background) ??? How do you bring Vim back to foreground? EDIT: I have tried fg
0
votes
1answer
25 views

Restore previous Vim search term?

Is it possible to save/restore Vim search terms in a map? For instance, I have the following in my .vimrc: map ,/ :s/^/\/\//<CR> If I have turned on highlighting (:set hls) previously in the ...
0
votes
0answers
34 views

Nerdtree crashes (mac) vim

I consistently get vim to basically fail when I use NERDTree and would like help! If I type :NERDTree & inside of any split (usually as a typo), macvim will become unresponsive and vim will throw ...
1
vote
1answer
38 views

Unable to find source of environment variable

So I did the mistake of removing an earlier version of Vim manually on Windows without going through the "Uninstall Program" dialog. The result left me with the enviroment variables of "vim" and ...
0
votes
1answer
20 views

vim: how to make the cursor as wide as the tab-character it is currently on?

When I navigate a file with vim, the cursor always highlights the current character. This works for normal characters having width 1. But for control characters or tabs which take up more space on ...
0
votes
2answers
26 views

How to reload vundle plugin after configuration change

I am using Vim with Vundle and I just changed a plugin specific setting in my .vimrc: let g:NERDTreeWinSize = 60 How do I reload the plugin to pick up this setting(s) without restarting vim?
1
vote
1answer
25 views

Move to next fold of level 1 in vim

I am looking for a good way to jump between function definitions in C++ code. I like the idea of using folds for that, because I can move to the next function/method using zj, but that only works if ...
1
vote
1answer
20 views

How to set ouput of the command execution in gVim to be in gVim window in Windows?

From time to time I use gVim in windows. I am used to running commands with :!which in Linux outputs into gVim window but in Windows the new command line window is opened. How to force gVim to output ...
0
votes
1answer
30 views

Why was vim deleted after system (ubuntu 14.04) update?

Everytime I compile vim and install it (I always use manual from the site), it is deleted after an Ubuntu update (not all updates but some of them). After such updates ubuntu always ask me to use ...
1
vote
1answer
21 views

Hitting enter in the quickfix window doesn't work

Normally, hitting enter in the qucikfix window leads to jump to the corresponding line. But when I hit enter, there is a message in the status line, says "xxx matchs, xx lines", instead of jumping. It ...
1
vote
1answer
20 views

Vim replace occurences of word with and without first capitalized in one S&R command

eg I have this peace of Java code public String setType(String newType) { this.type = newType: } I select all of it and I would like to search and replace type by model, but regardless of the ...
0
votes
1answer
29 views

How to switch windows in Vim in Windows (the OS)?

I've read that Ctrl-W + hjkl switches windows in Vim from this answer, but when I try that it simply closes my terminal. I'm on Windows and using vim on a remote account in my terminal.
0
votes
0answers
39 views

Neither less or less -X clear screen on exit. (Trust me, I googled…)

Neither less or less -X clear screen on exit. At the same time, vim does.... Env iTerm2, protocol mosh, server Centos + tmux + zsh iTerm2: report term as xterm-256color tmux: set -g ...