0
votes
1answer
36 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 ...
3
votes
1answer
45 views

Mapping s-tab in vim

I'm trying to set up some basic configuration for vim to make it more useful for myself. One of the things I'm trying to do is map shift+tab to a literal tab character, since my vim configuration sets ...
-1
votes
1answer
37 views

How to define default path to CtrlP for Vim in windows 7?

This is what i put in _vimrc to make E:\Workspace as project folder after hit Ctrl+Space after activate Ctrlp nnoremap <C-Space> :CtrlP E:\Workspace\<CR> but when I hit Ctrl+Space it ...
0
votes
1answer
17 views

Derive vimfiles directory from runtimepath option

I want to set a $VIMFILES variable in my vimrc file to determine in a non-platform-specific way the file path of my vimfiles directory (a la How do I get Vim home directory?). This should be trivial ...
1
vote
3answers
22 views

Removing a custom vim configuration

I've added a lot of small mappings to my vimrc that help me work, like noremap H ^ and inoremap jk <esc>. It's diverged enough from vanilla vim that other people at work have trouble coding on ...
1
vote
1answer
49 views

How to avoid `.viminfo` in `$HOME`

In one of my setting files I set viminfo to set viminfo+=n~/.cache/vim/info Now both ~/.viminfo and ~/.cache/vim/info are created. If I deleted ~/.viminfo it gets recreated again. How can I tell ...
0
votes
0answers
49 views

“Open with… Vim” does not load _vimrc settings

I use Vim (gVim to be precise) to write and edit files. When executing the editor directly, everything works fine. But if I open a file using the "Open with..." command on Windows, the _vimrc settings ...
0
votes
1answer
47 views

Windows Vim symlink config file persistent error

I'm trying to configure the native Windows Vim/gVim and the Cygwin Vim/gVim to behave nicely together. To this end, I created symlinks, ~/.vimrc and C:\Users\<myusername>\_vimrc, that both point ...
-2
votes
1answer
53 views

Vim - Using Functions to Search (.vimrc)

I'm have a timing problem with a function that I use to search in Vim. I need the search to be executed immediately, not after the function ends. I'm using "feedkeys" function (eg. ...
0
votes
1answer
145 views

Change menu/ui language of vim to english

I search on google and I read several answers but I am unable to change the menu/ui language of vim to english. Im my .vimrc I have set langmenu=en_US.UTF-8 language messages en_US.UTF-8 but it ...
0
votes
1answer
282 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 ...
1
vote
2answers
99 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
67 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
33 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
36 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
84 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
61 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
3answers
47 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
44 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
40 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
52 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
128 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
48 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
53 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
100 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
90 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
51 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
30 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 ...
0
votes
3answers
74 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
90 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
55 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
70 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
239 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
92 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
67 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
135 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
363 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
90 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
951 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
67 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
98 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
94 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
50 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
84 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
95 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
218 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
583 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
328 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
134 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 ...