Vim's configuration file.

learn more… | top users | synonyms

3
votes
1answer
2k views

How can I set the default font for gvim on Windows?

I use gvim on Windows. By default it uses the Fixedsys font, but I would like to use Consolas as the default font instead. I tried to set it using the menu option; it worked but it was reset the next ...
2
votes
4answers
828 views

Vim Tagbar is empty after installing CoffeeTags

I'm having the hardest time getting CoffeeTags to run in Vim. As the website suggests, I've installed the CoffeeTags gem and appended the configuration to my ~/.vimrc. When I open Tagbar it's empty. ...
6
votes
1answer
410 views

How to prevent a VIM file from becoming read-only when edited via a Windows symbolic link?

I've set nobackup and nowritebackup per this question - VIM destroys symbolic links under Windows However, whenever I modify the file via the link, the target file is set to read-only. How can I ...
1
vote
3answers
1k views

In Vim, how I can set a local match only for a specific filetype?

In Vimenter link description here, I can set local configuration as: setlocal number How I can set a local match only for a specific filetype? I use this: autocmd! BufEnter ...
1
vote
1answer
68 views

jump to <++> keeping fold

to jump in vim, I use nnoremap <c-j> /<++><cr>c/+>/e<cr> but, when the <++> are in a close fold, the <c-j> delete all fold, for this I change to nnoremap ...
0
votes
2answers
242 views

How do i get rid of a trailing $ when using vim?

A $ shows up at the end of every line when I'm using vim and I'm not able to figure out what in my vimrc is causing this. Heres a picture and my entire vimrc below it. What could it be? set ...
4
votes
2answers
220 views

How do I specify custom settings for vim based on file path

More specifically, I want to disable backup and swap file creation in vim, but only when opening/editing files that are on a specific remote volume or a specific folder. So, how do I go about ...
0
votes
2answers
88 views

Stop VIM backup file on only one file

Is it possible to stop VIM from automatically creating a backup for only a specific file? I have a running todo list I keep on my desktop, and I don't get any use out of the ~todo that constantly ...
11
votes
3answers
1k views

vim : toggle number with relativenumber

with setl nu! I can toggle number (on/off), similar with relativenumber setl rnu! how I can toggle {off,number,relativenumber} ?
0
votes
1answer
84 views

map a command with vim

How can I map a command in vim which does something like: :command (I write here and press enter) (Executes another command with the things that I wrote) or :badd my_buffer_name :b my_buffer_name ...
1
vote
0answers
61 views

Vimrc for different gnome-terminal profile?

I want to load different VIM color schemes for different gnome-terminal profiles. It's indeed two questions: How to know the active profile name in a gnome-terminal session? How to test with environ ...
0
votes
1answer
844 views

How do I get correct indentation for HTML and Javascript in gVim?

I've been using vim and gVim for over a year. I use it mainly for editing of HTML, PHP, Python and Javascript. Every time I've tried to set some automatic type of indentation I've got into troubles. ...
11
votes
2answers
12k views

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?
3
votes
2answers
950 views

Gvim paste using Control+Shift+V, while leaving Visual Block Mode Control+V

Is there a way to map paste to control+shift+v, and leave visual block mode as control+v in gvim? I use both quite often.
3
votes
1answer
2k views

What does sts stand for in a .vimrc?

I've been searching around, but the term vimrc sts has yet to lead me to an actual explanation of the value. Many people talk about using it for tabs/indenting, but what does it stand for? Is it soft ...
2
votes
1answer
1k views

How to get Vim in cygwin/Windows to underline the CursorLine properly?

Here is a portion of my .vimrc : set background=dark set cul hi CursorLine term=underline cterm=underline gui=underline On Linux, vim displays fine and the cursor line is underlined with a thin ...
1
vote
1answer
295 views

GVim Specify Directory for :browse open Command

I have added the line: :browse open to my vimrc file, but have been unsuccessful in getting GVim to open a file browser starting in a specified directory. In particular, I would like to know if it ...
0
votes
2answers
1k views

How to set color scheme for VIM in Mac Terminal?

It seems that the VIM color scheme is conflict with Mac Terminal's setting. I want to change the highlight search color. And it's OK by setting in VIM ESC mode. (:hi search ctermbg=4) However, it's ...
1
vote
2answers
471 views

Corrupt vimrc file

I installed janus for my macvim (I am running Snow Leopard) and everytime I go to edit the ~/.vimrc file I get these errors: Error detected while processing function Edit: line 7: E319: Sorry, the ...
1
vote
1answer
674 views

Can I set the horizontal scroll offset in Vim?

I would like to always see a little bit of context when the lines are to long, like: set scrolloff=5 Is possible?
0
votes
1answer
617 views

~/.vim folder has gone after vim reinstall (Ubuntu 10.10)

I had a problem with an arrow keys in Ubuntu (known as the A B C D problem). All advices I have found does not help me to resolve this bug. So, I deside to reinstall vim totaly. After I install it ...
1
vote
1answer
699 views

Split up .vimrc, where to put what?

I've go a bunch of filetype dependent autocommands in my .vimrc, some of which are syntax related. I'd like to put these in separate file throughout my .vim/ tree, eg. some tex syntax would go in ...
0
votes
3answers
3k views

Mapping keys in VIM on Mac

I had a previous problem that was solved, but it seems I am stuck once again. I'm trying to reassign the keys for switching between Windows to be more intuitive. I've found that you should be able to ...
8
votes
1answer
3k views

vim not loading _vimrc file when launched from git bash

I have downloaded and installed git for windows (msysgit) and frequently used the included git bash. Whenever I run vim from git bash my _vimrc file is not loaded because there is syntax highlighting ...
2
votes
1answer
105 views

Two different Windows installations running the same colorscheme, different results

I recently copied over my Vim settings to a new Windows computer. I use a tweaked version of the molokai vim theme that I named "molokai-mine". Here's what it should look like: On my new ...
1
vote
1answer
459 views

Running gVim on a USB Drive

How could I run gVim on a USB drive (I can't install software on the computer) preferably I'd like to load it on the USB drive with a mac (so I can't install an exe - but I could use a pc) and also ...
2
votes
2answers
4k views

gvim options / Settings window cannot write buftype is set e382

I was trying to customize gvim a bit. I see under the Edit menu is an option to change Settings Window. It opens up but then I get the following error. E382 cannot write, 'buftype' option is ...
6
votes
1answer
205 views

Time of day as conditional in Vim

I'm working on improving my .vimrc, and I want to have command inside of it that depends upon whether it is night or day. I'd like to have something like the following in the end: if isNightTime " ...
1
vote
2answers
472 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 ...
4
votes
1answer
1k views

vim - set relativenumber not working from vimrc, only works when set in buffer

For the life of me, I cannot figure out why set relativenumber does not load when set in my .vimrc file. Other settings, like set number and setting the color scheme work perfectly. If I want set ...
8
votes
6answers
5k views

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 ...
2
votes
2answers
2k views

How to set syntax specific settings in my VIMRC?

I work with several languages and markups in vim every day (ruby, python, javascript, CSS, HTML, etc), and would like to have different settings for each buffer when I fire up my editor. How can I ...
25
votes
7answers
6k views

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 ...
8
votes
2answers
2k views

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 ...
1
vote
2answers
642 views

vimrc - Acess Denied

I'm trying to add in colorscheme desert at the bottom of my _vimrc file within Windows 7 and when trying to save it, I keep getting "Access Denied". I set my HOME variable to the "C:\Program Files ...
2
votes
2answers
3k views

Command contains pipe characters - why is vim saying “not an editor command”?

I'm trying to map some commands to a shortcut in vim. Specifically, I'm trying to get a colorized git diff. If I type this command in Ex mode, it works as expected: :! git diff --staged % | colordiff ...
4
votes
3answers
4k views

Enabling vim file type plugin

In my .vimrc file I have this line.. filetype plugin indent on and then in ~/.vim/ftplugin/py.vimrc (I've also tried saving it as a .vim file) I've copied and pasted a vimrc file for python ...
3
votes
1answer
134 views

What site is there for sharing Linux custom configuration files?

I remember someone here at SU gave a link to a site where you could share your Linux custom configuration files (like bashrc, vimrc and others), but I don't remember what was that site. I already ...
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 ...
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 ...
15
votes
3answers
5k views

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 ?
277
votes
3answers
80k views

How do you reload your .vimrc file without restarting vim?

Can you edit your .vimrc file in vim, and reload it without restarting vim?
0
votes
2answers
3k views

Setting the viminfo path in gVim for portability (Windows)

I'm trying to make my gVim installation as portable as possible, and in doing so I want to put the _viminfo file in the $VIM directory rather than $HOME. I'm pretty new to hacking vimrc ...
1
vote
3answers
500 views

How can I assign vim to be the default application to open my _vimrc file? (Windows 7)

I would like to be able to double click on the file "_vimrc" and have it open up in vim. However, "_vimrc" doesn't have a file extension so I can't have it open in vim based on file type. EDIT: ...
2
votes
1answer
540 views

vimrc configuration

I'm sorry if my title seems vague. I wasn't sure how to make a succinct title. I have 2 questions: 1) For tab movement in vim, when I map ctrl+pgup to ctrl+p and ctrl+pgdown to ctrl+n, it works fine ...
1
vote
1answer
2k views

Vim full color and anti aliasing on Windows 7

I am just wondering how to get VIM to run under full color (32 bit) rather than 256 colors. I am also trying to get anti aliasing but haven't found anything. I am running gvim 7.2 on Windows 7. ...
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?
1
vote
1answer
132 views

Starting vim at top of the screen

I'm an avid MacVim user and every time I launch it the window starts about 2 rows too far down on the screen to where I have to drag it up to the top of my screen every time. Is there anything I can ...
2
votes
1answer
989 views

Linux Ubuntu Vim - navigate to symlink/link directory?

Hey guys can you help me with some issues on how to navigate through links to the directory or file it points to through the command line? If i try to 'cd' into them it says they are not directories ...
1
vote
4answers
4k views

Filetype detection not working

My vimrc is up here, I am using the same vimrc on two seperate computers, both macs (MacVim). One detects the filetype correctly when launching a file from the terminal. The other makes me manually ...