Vim's configuration file.

learn more… | top users | synonyms

0
votes
1answer
66 views

Can't get vundle or neobundle to work on GVim on Windows 7 64bit

Can't get these add-ons (vundle or neobundle) to work on my Windows 7 machine. Everytime I try to install plugins I'm getting the following error messages: Error detected while processing function ...
0
votes
2answers
52 views

How can I validate my .vimrc?

My .vimrc files seems to work, and doesn't generate any visible errors during normal operation. I recently started using Knife, and found that I cannot use Vim as my editor for editing Chef content ...
1
vote
2answers
29 views

Should I create an empty $HOME/.vimrc, or copy /etc/vim/vimrc?

I want to make modifications to $HOME/.vimrc, but the file does not exist yet, so I need to create it. Should I copy /etc/vim/vimrc to $HOME/.vimrc, and then make my modifications, or should I just ...
0
votes
1answer
26 views

Can I change a Vim setting persistently using a shortcut?

Can I change a Vim setting persistently using a shortcut? Hypothetical Example: nnoremap <script> <F7> :call ChangeConfig()<cr> function! ChangeConfig() set virtualedit=all ...
1
vote
2answers
32 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 ...
1
vote
2answers
67 views

Why is there a difference in the popup dialog from .gvimrc and command line?

I am using gVim's confirm() function to pop a dialog waiting for the user to click a button. However, there seems to be a difference in the appearance of the dialog when called from .gvimrc: Using ...
2
votes
2answers
33 views

How to use multiple spaces in listchars?

I'm currently using the following listchars I found on vim casts: set listchars=tab:▸\ ,eol:¬ I'd like to make tab be ▸ followed by 3 spaces, but I can't seem to get it to work. I've tried the ...
0
votes
2answers
38 views

Vim - Visual Mode - Improve Word Selection

Gentlemen/Ladies, I do not understand why vim is exhibiting the following behavior when I trigger the shortcut below on visual mode (.vimrc): vmap <script> <C-LEFT> :call ...
1
vote
1answer
38 views

How can I check if the cursor is at the end of a line?

Gentleman, Simple question about Vim! How can I check if the cursor is at the end of a line using a function in vimrc? []'s
1
vote
1answer
35 views

Vim: Vertical navigation in insert mode

I am using vim for quite some time but I think I broke my settings somehow after installing a few packages. Let me show it with examples. In normal mode I am used to navigation like this: However, ...
-3
votes
1answer
40 views

VIM - Detect Whether a Plugin is Active/Running/Open?

I would like to do some tricks with VIM and so I ask the help of you guys! It is possible to detect whether a plugin is active/running/open? You can close a plugin by its name? You can close a ...
0
votes
2answers
61 views

vim - Autosave file to disk, efficiently

I keep a log file, and want it to be written to disk without having to manually save it after every edit. I've used the :au! CursorHoldI,CursorHold <buffer> silent! :update command that I found ...
2
votes
1answer
41 views

Map vim commands to compile-time features

Vim has the notion of features, i.e. subsets of functionalities that may or may not be supported in an actual installation, based on compile-time flags. Presence of a feature can be checked with the ...
1
vote
1answer
44 views

Vim: What is the difference between these two methods of setting a variable?

In my .vimrc, I have the following variable defined: let $VIMFILES = "~/.vim" Further in my .vimrc, I attempt to set the backupdir option like so: set backupdir=$VIMFILES/backup " `set backupdir?` ...
0
votes
1answer
61 views

Vim not making font italic when it should?

I use gvim and use the colorscheme called slate. I modified it a bit and saved the changes in .vim/colors/slate-mine.vim and all the changes take effect except for one. I wanted to make all comments ...
1
vote
1answer
55 views

Why viminfo setting dosen't work in VIM

I set the viminfo in my .vimrc for making startup faster . However, the setting doesn't work. The setting is: set viminfo=%,\"100,'10,/50,:100,h,f0,n~/.vim/cache/.viminfo When I tried to echo ...
0
votes
1answer
29 views

Should I bother moving stuff from vimrc to gvimrc?

Is is worth moving gui-related options out of my vimrc and into a gvimrc if there's only a couple such options? I'm kind of inclined to keep everything in one place and house gui options inside if ...
1
vote
1answer
27 views

Does reload vimrc from a terminal give an error?

When I reload .vimrc from vim, it doesn't give any sign of error. :so % But when I use terminal to reload, it gives an error. $ source ~/.vimrc Does it suppose to give an error? Or I'm not ...
1
vote
0answers
61 views

Vim will not stop creating backup files (Windows 8)

I'm using Gvim on Windows 8.1 and even after setting nobackup and nowritebackup in _vimrc, Vim insists on creating those pesky backup files (the .ext~ ones). I'd like to disable this behavior ...
0
votes
3answers
61 views

Cannot find where this colorscheme setting is being set for vim on OS X

A long time ago I was farting around with color schemes for vim and I remember setting a line somewhere colorscheme sonofobsidian. I did this before I knew what I was doing with vim, unix, OS X, etc. ...
0
votes
1answer
63 views

Set vim to auto insert spaces after comma?

I would like configure my vim to automatically insert spaces after characters like commas, brackets, braces and parens. This is purely for aesthetics. Does anyone know how I could do this or point ...
0
votes
1answer
47 views

vimscript delete whole line or word in command mode (q:)

I'm trying to figure out how to delete a whole line in command mode. I see lots of example .vimrc's with: cnoremap <C-a> <Home> cnoremap <C-b> <Left> cnoremap <C-f> ...
0
votes
2answers
60 views

automatically add to vimrc

I had a simple question, but I've been having trouble finding any answers to it. Is there any command for automatically modify my vimrc from command mode? Specifically, say I wanted to always have ...
2
votes
1answer
156 views

how to turn off gvim error highlighting?

I use gvim as my text editor and the syntax coloring is great except it highlights "errors" and gives it a white background with red font. How do I turn off error highlighting? I find it annoying and ...
0
votes
1answer
71 views

gvim how to remove word highlighting

Okay so I am using the 'slate' color scheme in gvim and it is really great and I like it a lot except recently I have starting working with html and css files and for some reason, it starts ...
0
votes
0answers
58 views

gvim how to open different FileTypes in different color schemes

okay so I want gvim to open all my files using the 'slate' color scheme except for .html and .css files. I want it to open .html and .css files using the 'ron' color scheme. I tried doing colo slate ...
0
votes
1answer
106 views

Mapping a leader key combination to Shift-Insert in putty while editing in VIM

I use putty (windows) to connect to a remote machine and my daily work revolves around coding in vim. I have to copy paste from the windows clipboard a lot, and for that I use the Shift+Insert key ...
2
votes
1answer
278 views

Why does Option+Left Arrow work in Vim, but not Right Arrow on Mac OS X?

Using Vim in Terminal on Mac OS X, my Option+Left Arrow skips words as expected, but my Option+Right Arrow does nothing. How can I fix this?
0
votes
1answer
80 views

How do I get vim to input the bar/pipe character in my vimrc?

I've tried the following, but it doesn't work. inoremap <C-\> <Esc>$a<Space>do<Space><Bar><Bar><CR>end<Esc>k$i I'm trying to map a shortcut for ruby ...
1
vote
2answers
572 views

How to setup vim to edit both Makefile and normal code files?

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

Vim: automate reading line from external file

I am trying to automate the following in vim: :r! sed -n 10p filename Where the line number (10) is constantly changing. I was thinking something along the lines of function! GetLine(line, ...
0
votes
1answer
81 views

gvim: Map a command which uses the current file name (%) in vimrc

In gVim in windows, I want to map a command in the vimrc file that uses the current file (%). I write something like: map <F5> !mycommand % But then, when gVim first loads, it runs vimrc and ...
2
votes
1answer
90 views

In vim what is the difference between “+ and ”* registers?

In vim what is the difference between "+ and "* registers? Which one should be used for copying from and pasting to vim from other aplications? Do I need to append anything in .vimrc file to get ...
3
votes
1answer
45 views

Directory suggestions on Vim status line

Recently I came across the following in a video about Vim: typing Tab in the command line in vim makes the status line show you suggestions on the possible directories matching the letters you typed ...
0
votes
0answers
81 views

vim colo directive ignored in console

I have the following in my .vimrc: if has("gui_running") colo desert " ... else colo distinguished " ... endif gvim works fine. When I open vim in gnome-terminal in tmux, the colo ...
1
vote
1answer
36 views

Use VIM to pass options to PDF reader

I have a BASH script that recompiles a latex document and reopens it up using my PDF reader when the buffer is written back. The command in my '.vimrc' looks like this: autocmd BufWritePost *.tex ...
0
votes
3answers
85 views

vim "+ register unreachable. + key causes unwanted motion

+ and - work as expected only in the insert mode. When I try to yank a line in the visual mode using "+y combination, + causes cursor to move one line up and - one line down. The last pressed key ...
0
votes
2answers
167 views

SourceTree thinks .vimrc is binary

SourceTree thinks .vimrc is binary, so I can't see the diff within the window. Based on this page, I thought it was because of the encoding, so tried changing the encoding to utf-8 using the ...
2
votes
2answers
361 views

Showing some whitespace chars, but not all, in vim?

I'm using the set list and set listchars options in vim. I'd like to customize set listchars to display trailing spaces, etc., but not tabs. Is it possible to specify that I don't want a particular ...
0
votes
1answer
259 views

Highlight the character the cursor is on in vim

How can I highlight the cursor in vim? I am interested in highlighting only the letter that the cursor is in. Using: set cursorcolumn highlight CursorColumn guibg=lightblue ctermbg=lightgray ...
1
vote
2answers
118 views

Relative paths in .vimrc

I'd like to add something like let coffee_compiler = '~/repos/coffee-script/bin/coffee' to my .vimrc, but vim won't expand the ~ (obviously since it's not my shell). How can I make this work ...
1
vote
1answer
132 views

Select vimenter autocmd's to run based on args

I'm trying to reduce the number of things I need to do when I open VIM. I have the three following scenarios that I'd like to account for: 1. Open vim with a directory specified vim . For this ...
0
votes
0answers
115 views

Vim format python using formatexpr/prg (gq) gives incorrect result

I am having trouble with Python's interaction with comments. These can be divided into two issues. I expect they're related, so I'll post them both here. Issue 1. When using gq to automatically wrap ...
2
votes
2answers
62 views

How can I make my configuration available regardless on which machine I am working on?

I have created a custom .vimrc and .bashrc in my local machine. Also I have a couple of vim plugins that I find useful. Now I ssh remote servers to work very frequently. But each time in order to work ...
2
votes
3answers
533 views

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 ...
0
votes
1answer
80 views

Can I make the font size in my NERDTree window smaller than in all other windows of Vim?

Can I make the font size in my NERDTree window smaller than in all other windows of gvim? I like large font size of 15 but I'd like the folder tree window of NERDTree to be 12 - is this possible to ...
2
votes
1answer
44 views

Vim is putting two tabs whenever I punch in tab

I have the following settings to have two-space sized tab stops: :set tabstop=2 :set noexpandtab :set shiftwidth=2 However, every time I hit Tab, two 2-space-width tabs go in. I just want a ...
4
votes
2answers
53 views

Vim joining lines during wraping

I am using formatoptions to format my files. But if I have a new line character in my tex file, Vim joins the lines, removing this character. How to define in Vim the hard wraping without joining ...
0
votes
2answers
165 views

vim c/c++ ftplugin scripts

I make some additions to the regular runtime in my vim configuration. I add to rtp a directory where there are ftplugin directory, in which I have two files: c.vim and cpp.vim. In these files I ...
0
votes
0answers
72 views

Vim display invisible characters

I am trying to display invisible characters in Vim by the following in my vimrc set list set listchars=tab:▒░,trail:▓ But every time it shows me the wrong characters. I have encoding=utf-8. I set ...