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

preventing vim from destroying screen's scrollback buffer

when not using gnu screen, vim exits without littering my scroll back buffer. It vanishes, and all i get is a new bash prompt. everything that was on the screen before starting vim is there. when its ...
0
votes
3answers
117 views

mapping jj to escape in macvim works but not in terminal vim

In my vimrc I have: inoremap jj <ESC> Using the latest macvim I can hit jj and i'll jump from insert to command mode, but using the same vimrc with just regular vim in iterm2 it just inserts ...
0
votes
1answer
54 views

Unexpected behaviour in vim solarized with urxvt

I get the following garbage characters as @k displayed in vim when using solarized in urxvt. However when i resize the window the issue disappears. note that I am using i3wm as my window manager. My ...
0
votes
1answer
91 views

Cannot copy from Vim under Tmux into clipboard using "+p on Ubuntu

I'm using zsh, tmux, and Vim and for some reasons recently, I've noticed I cannot copy from Vim to X clipboard under tmux using "+y. Any idea how I can troubleshoot this issue? It used to work before. ...
0
votes
0answers
36 views

Can't get vim to display colorschemes right

After reading everything that I could find form google... I still don't have a solution. OS: Arch Linux Terminal: rxvt-unicode The output of command: tput colors is 256 (Shown in the image ...
1
vote
1answer
14 views

how to search long_word under cursor in vim

I know you can search word under cursor in VIM by # and *, but that search does not work for something like 'long_word', e.g., if my cursor is as 'l|ong_word', then I search by # or *, word like ...
0
votes
1answer
126 views

cygwin: vim in mc not coloring

I have a setup using cygwin with midnight commander and vim. I have a proper .vimrc in my home folder, which works fine if I start up vim directly on the console. Now I also want mc to use vim, so I ...
0
votes
1answer
21 views

Vim syntax highlighting problems with Haskell

Normally vim is very good with syntax highlighting, it hasn't given me any problems with HTML, Javascript, Python, etc., but now I'm using Haskell and it doesn't want to cooperate. Here's what it ...
0
votes
0answers
52 views

vim mouse wheel scroll to move cursor but NOT screen viewport

I see plenty of results on Google for how to use the mouse wheel to scroll the visible text in a terminal running vim without changing the cursor position. But I can't find out how to move the cursor ...
0
votes
1answer
97 views

Editing files locally with Vagrant

Is it possible to edit files using non command-line editors, such as Notepad++, with Vagrant?  If so, how would it be done?
0
votes
0answers
27 views

Unicode keyboard on Mac OSX mess VIM editor badly

When I using Unicode keyboard on Mac OSX (Vietnamese in my case) while using normal mode VIM and try to type into the editor (starting with i and then some combination to produce non-ascii ...
1
vote
2answers
226 views

Open iTerm and run Vim from a directory in Finder (OS X)

Is it possible (maybe with Apple Script or something) when I'm in a folder in OSX's finder to open iTerm and run vim with this folder as the working directory? This would be useful to quickly create ...
1
vote
3answers
56 views

using a local version of vim instead of system on CentOS

My school runs centos and a dated version of vim. i want to use a new version of vim so I can have access to stuff I otherwise wouldnt. I built and configured a 7.4.300 version of vim with python, lua ...
0
votes
3answers
63 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
30 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
102 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 ...
1
vote
1answer
103 views

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

Using emacs in console mode, I want to copy mouse selected text from emacs and paste it to another application (possibily another term). But emacs will add full spaces to the selection to fill the ...
2
votes
1answer
45 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
159 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 ...
2
votes
1answer
60 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
66 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
28 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
138 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
64 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
319 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
25 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
47 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
36 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
3answers
154 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
31 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
37 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 ...
2
votes
1answer
65 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
267 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
68 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
270 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 ...
1
vote
0answers
44 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
28 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
207 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
109 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
38 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
38 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
73 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 ...
2
votes
2answers
39 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
33 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
30 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
92 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
146 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
118 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
40 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
32 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: ...