Vim's configuration file.
Questions tagged [vimrc]
282 questions
589
votes
5 answers
How do you reload your .vimrc file without restarting vim?
Can you edit your .vimrc file and reload it without having to restart Vim?
![](../../users/profiles/34498.webp)
ivo
- 6,001
- 3
- 16
- 5
205
votes
8 answers
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?
![](../../users/profiles/22226.webp)
AJ.
- 3,991
- 8
- 29
- 34
123
votes
2 answers
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 /usr/bin/cscope which does not exist and everytime I…
![](../../users/profiles/19064.webp)
florin
- 1,431
- 2
- 10
- 7
51
votes
8 answers
Can't Copy to Clipboard from Vim
I'm running Vim 7.3 under Linux Mint 13 (using MATE) and I'm not able to save text to the system clipboard. I run Vim in the terminal and copy text from the terminal with CTRLINSERT. When I select text in Vim (either with the mouse or in visual…
![](../../users/profiles/281126.webp)
maksim
- 621
- 1
- 5
- 6
46
votes
8 answers
How to make VIM settings computer-dependent in .vimrc?
I share my VIM configuration file between several computers. However, I want some settings to be specific for certain computers.
For example, font sizes on the high-res laptop should be different to the low-res desktop. And more importantly, I want…
![](../../users/profiles/11027.webp)
bastibe
- 3,842
- 9
- 33
- 44
43
votes
4 answers
How to split existing buffer vertically in vim?
I have list of buffers in vim. I can split buffer horizontally using :sb[N] where N is the buffer number. How can I split the buffer vertically ?
![](../../users/profiles/35058.webp)
blacklife
- 433
- 1
- 4
- 4
41
votes
3 answers
How can I make the Sign Column show up all the time even if no Signs have been added to it?
I've just added the Git Gutter plugin for Vim which shows lines added/modified/deleted according to git diff. It uses the Sign Column to show characters next to each line.
At the moment the column appears on save, which is quite jarring. I'd prefer…
![](../../users/profiles/25534.webp)
jordelver
- 2,251
- 4
- 23
- 29
32
votes
2 answers
Are vimrc and viminfo the same files but with different names?
Are .vimrc and .viminfo the same files but with different names?
In every tutorial there are advices to change .vimrc, but I don't have this file, only .viminfo. Are they the same?
![](../../users/profiles/75266.webp)
Sergey
- 1,685
- 7
- 23
- 29
31
votes
6 answers
How can I make .vimrc read from an external file?
I'd like to modify my .vimrc to read the value of a variable from an external file. How can I do this?
Specifically, a friend and I share a git repo with our .vim files, but there are a few small differences in what we want in our configs. So most…
![](../../users/profiles/1457.webp)
Nathan Long
- 26,015
- 36
- 102
- 139
27
votes
3 answers
How to setup vim to edit both Makefile and normal code files with two different types of indentation?
I am using Mac OSX 10.7.5, the contents of .vimrc is as follow:
set tabstop=4
set shiftwidth=4
set softtabstop=4
set expandtab
set shiftround
set smarttab
set autoindent
set copyindent
autocmd FileType make setlocal noexpandtab
What I am…
![](../../users/profiles/37126.webp)
forestclown
- 501
- 1
- 7
- 14
27
votes
4 answers
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?
![](../../users/profiles/75743.webp)
Martin Ueding
- 2,365
- 8
- 28
- 42
26
votes
3 answers
Creating ~/.vimrc disables syntax highlighting
I started using Vim as it was first installed and then decided to change the indentation behavior by adding
set tabstop=8 softtabstop=0 expandtab shiftwidth=2 smarttab
to ~/.vimrc as suggested by…
![](../../users/profiles/150403.webp)
Code-Guru
- 161
- 3
- 9
24
votes
5 answers
Always use :set paste, Is it a good idea?
In a terminal vim, pasting clipboard data often messes up the code indent.
I just knew if I uses :set paste the indent is not broken.
Though, after pasting data, should I do :set nopaste again? What if I don't, what problem comes?
![](../../users/profiles/45710.webp)
Benjamin
- 2,239
- 5
- 26
- 39
23
votes
2 answers
Why does Vim ignore files in ~/.vim/after/ftplugin?
I seem to have a problem with my local Vim configuration but I'm not sure what it is. I need to override some filetype-specific settings. As per multiple tutorials/howtos, I created ~/.vim/after/ftplugin/cpp.vim with appropriate setlocal statements,…
![](../../users/profiles/43724.webp)
AdSR
- 233
- 2
- 4
21
votes
4 answers
Setting vim options only for files in a certain directory tree?
There is a programming project I work on where everyone else uses a tabsize of 4, so I find it most straightforward to set tabstop=4 in my ~/.vimrc. However, I'd rather not have this affect every file I edit - just those for this project - let's say…
![](../../users/profiles/3021.webp)
Andrew Ferrier
- 2,094
- 4
- 26
- 39