Vim's configuration file.

learn more… | top users | synonyms

104
votes
3answers
64k views

Where should the .vimrc file be located on Windows 7?

I recently installed vim on Windows 7 as a stand-alone binary. Where should I put my .vimrc file?
3
votes
2answers
811 views

vim coding templates

I recently started learning vim and, I'm curious, what's the best way to setup a sort of bare-bones template for specific types of files? For example: say I wanted to automatically load some C ...
2
votes
4answers
115 views

Vim copy/paste messing up indentaton

Whenever I copy something from another application and then go to paste it into vim, it messes up the indentation. For example, just now I tried to copy the manifest.json file from the hello-world ...
45
votes
2answers
14k views

How to start vim without executing /etc/vimrc?

On my Linux server at work, the admins did not install cscope, and I installed it from source in my home directory and added it to the $PATH. The trouble is, the /etc/vimrc has a reference to ...
11
votes
5answers
4k views

Vim configuration slow in Terminal & iTerm2 but not in MacVim

Ideally, I want to use Vim from Terminal or iTerm2. However, it becomes unbearably slow so I had to resort to using MacVim. There is nothing wrong with MacVim, however my workflow would be much ...
6
votes
4answers
2k views

How can I test for plugins and only include them if they exist in .vimrc?

In my .vimrc I am trying to use ftplugin and obviously use some commands relating to that under the assumption that it was loaded successfully. However, I have now encountered a few old machines that ...
6
votes
5answers
4k views

Tips for using vim as a log viewer

As a log viewer, which of vim's features are convenient? less -F is quite good. But I believe vim could be better if we knew its hidden features. * or # v//d g//d etc.. PS. I don't use ...
1
vote
1answer
494 views

Vim has unexpected key presses on startup, what could be causing this?

Whenever I open a file with vim, the vim session starts with 2c having been automatically/programmatically 'pressed'. This means that if I start off trying to move down the file by pressing j, then ...
1
vote
2answers
56 views

How to determine what buffer was changed externally with gVim?

I am using the following Vim autocommand in my .gvimrc file: augroup MyAuGroup autocmd MyAuGroup FileChangedShell * call FileChanedEvent_BuffUpdate() augroup END function ...
0
votes
1answer
474 views

Line length highlighting works correctly in console Vim, not GUI

This question is related to this one. Damian Conway provided a nice snippet for marking excessive line length in his recent OSCON 2013 talk about Vim. highlight ColorColumn ctermbg=magenta call ...
4
votes
1answer
963 views

Symlink to .vimrc on windows makes file readonly upon write. Why?

I've put my .vimrc file in a central location (dropbox folder, also a hg repository). Under Windows 7, I've symlinked to it from my home folder (strangely enough I had to do it as an administrator, ...
1
vote
2answers
474 views

Customize autoindent settings in VIMRC file

I have autoindent enabled in my .vimrc file but have run into an annoying bug/feature. For example, when I'm tabbed in 3 times, and I hit return, the new line is also tabbed in 3 times. Then when I ...