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
26 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 ...
3
votes
2answers
94 views

How to jump to top or bottom of script with keyboard shortcuts?

I'm looking for the VI/VIM equivalent of 'gg' and 'Shift+g' but within PyCharm. Searched through their docs and didn't find anything.
2
votes
1answer
4k views

How do I set up neocomplcache?

I just started using vim and saw a cool plugin: neocomplcache. My problem is that I can't get it to work properly. After installing, I took the example config from the help files of neocomplcache and ...
6
votes
2answers
1k views

How can I change the scroll wheel behavior in vim, so that it scrolls instead of moving the cursor?

I would like scrolling up to be equivalent to c-y c-y c-y, and scrolling down to be equivalent to c-e c-e c-e. The documentation here seems to suggest that this should already be the case, or I can ...
2
votes
5answers
3k views

Make text bold in vim

I am working on Ubuntu and using vim to make C files. I want to make the entire text in the editor bold. How can I do that without installing any plugin? I am not looking to make specific words bold. ...
2
votes
1answer
32 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
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 ...
1
vote
2answers
648 views

Increase the space between lines in vim

I think the title says it all. I've done my homework and the only command that I found was: :set linespace=3 but it doesn't seem to work, neither on the Mac nor in Linux. Edit: In Mac OSX you can ...
9
votes
1answer
1k views

Why can Vim open large files faster than some other text editors?

When opening large log files (well, not that large, but 80mb is still a lot of text!), I've always used Vim since it loads them almost instantly. Other text editors like Notepad, Notepad++, etc will ...
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
1answer
22 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
13 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
3answers
58 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
492 views

Reformat line breaks in Vim markdown file

I recently converted from TextMate to MacVim with Janus for editing my markdown files. How can I reformat an old markdown file so that lines longer than 79 characters are converted from a single ...
5
votes
3answers
666 views

Repeat last normal mode command, including moves, in Vim

In Vim, with ., I can repeat the last normal mode command; for example: dd. deletes a line twice. But, if I type 5j. the cursor does't move 10 lines down. How do I repeat the last normal mode ...
2
votes
5answers
771 views

Have I missed the :mv command in Vim?

From time to time I want to rename a file while editing it. For example from .html to .xhtml or so. To do that in Vim, I must do :saveas new_file :!rm old_file Is there a built-in command, that ...
4
votes
3answers
3k views

Change color scheme when calling vimdiff inside Vim

I'm using the VCSCommand plugin. I'm calling VimDiff utility inside Vim by calling :VCSVimDiff. I have in my vimrc: if &diff set t_Co=256 set background=dark colorscheme peaksea ...
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
31 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 ...
6
votes
6answers
2k views

Is there any way to hook saving in Vim up to commiting in git?

I am new to the world of Vim, and I want to make it so that every time I save a file it is commited to version control. Is this possible?
3
votes
1answer
2k views

tmux: enable mouse scrolling in vim instead of history buffer

I have just started using tmux 1.8 recently, after working with screen for a while. After reading things here and there on the internet, I came up with following ~/.tmux.conf However when I open vim ...
10
votes
5answers
2k views

How can I discard file change from fugitives status window?

When in the fugitive-plugin status window, accessed using :Gstatus, it's possible to diff changes for a file using D and toggle files for commit using -. Is there any similar shortcut for discarding ...
0
votes
1answer
18 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
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
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 ...
2
votes
2answers
810 views

How can I prevent Supertab to try completion even if I just want to enter a tab?

Even when I have an empty buffer in vim, supertab tries to do a completion at the begining. How can I configure supertab to only try tab-completion if there's a character?
9
votes
2answers
11k views

Configure VIM for copy and paste keyboard shortcuts from system buffer in Ubuntu?

How do I configure VIM for using Ctrl-c to copy and Ctrl-v to paste from system buffer in Ubuntu?
0
votes
0answers
23 views

Is vim viable as a ide? [closed]

With Plug ins available for vim that seem to offer the ability to turn Vim the text editor, in to Vim the IDE, what are the pro's and cons of extending vim? does it lend it's self best to any ...
1
vote
2answers
43 views

Vim colorschemes ONLY works in .vimrc

If I'm editing specifically ~/.vimrc in vim :colorscheme <some colorscheme> will do exactly what it's suppose to do. Only schemes in /usr/share/vim/vim74/colors will work though and not say in ...
0
votes
0answers
23 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 ...
2
votes
2answers
24 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 ...
10
votes
4answers
1k views

put `.vimrc` into the `.vim` folder

Is it possible to put the .vimrc into the .vim folder so that I only have to sync the whole folder and not folder and file to other computers?
23
votes
8answers
16k views

How to remove this symbol “^@” with vim?

I have some files that are corrupted with this symbol: ^@ It's not part of the string; it's not searchable. How do I substitute this symbol with nothing, or how do I delete this symbol? Here ...
4
votes
3answers
3k views

Vim Solarized dark theme looks weird on iTerm2

I just installed the solarized colorscheme following instructions on the project's page. This is what it looks like now: which is not like those screenshots on the official page. Any idea how to ...
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 ...
2
votes
2answers
341 views

Replace a regular expression within vim with an output produced by a console command with the expression as its argument?

let's say I have a file with the following content: This is a _file_ which has some _special_ keywords, that I would _like_ to replace. I can do a search and replace of the speical keywords ...
1
vote
3answers
2k views

Using vim to force edit a file when you opened without permissions

I use vim to edit a file. Sometimes, I forget to have the appropriate permissions. I run vim and the file as a read only file. I can make changes, but I can't actually write the changes. Every once in ...
1
vote
1answer
23 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
41 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
122 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 ...
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
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
votes
2answers
1k views

how to use vim to manage and send emails

I would like to use vim/gvim as tool for mail managent and I found these 2 interesting pages. claws vmail I understood that these suffer from the following limitations with vmail you can see and ...
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 ...
1
vote
0answers
23 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 ...
14
votes
5answers
4k views

How to make Emacs read buffer from stdin on start?

With Vim I can easily do $ echo 123 | vim - Is it possible to do with Emacs? $ echo 123 | emacs23 ... Emacs starts with a Welcome message $ echo 123 | emacs23 - ... Emacs starts with an empty ...
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 ...