Vim's configuration file.

learn more… | top users | synonyms

0
votes
2answers
27 views

Disable vim plugins for large files

I have a custom Vim configuration that I've been putting together. There's a number of cool plugins and features that aid in PHP development. However, when I open a large file (couple thousand lines) ...
0
votes
1answer
10 views

sourcing the .vimrc gives E174 error

I am using vim on a Mac os X. After editing my .vimrc file and I want to try to reload it without restarting vim. But it gives me the following error. E174: Command already exists: add ! to replace ...
1
vote
2answers
88 views

vim: library of common substitutions without plugins?

I would be wanting to perform thinks like :'<,'>s/^\ \ \ \ // in an abbreviated form, like :'<,'>s_lw (no matter what would actually be that s_lw) using vim base functionality, initially ...
0
votes
1answer
56 views

vim's vimrc messes up vim completely

i am using manjaro linux, and i installed vim using $ sudo pacman -S vim then i modified my vimrc file $ sudo vim /etc/vimrc then i added some cool things: set background="dark" set number set ...
0
votes
1answer
32 views

How to run something insert mode, get user input then return to insert mode?

I have inoremap <C-d> <C-o>:%s/\<<C-r><C-w>\>\C//g<Left><Left>, which works great (emulating sublime text's find-all multi cursor more or less). However it ...
0
votes
1answer
46 views

VIM Crashes/Freezes on specific files Mac OSX Mavericks

I've recently switched over to using VIM and use a friends .vimrc that works well for him https://github.com/dtothefp/dotfilesv2/blob/master/vim/vimrc.symlink I first installed vim through Homebrew ...
1
vote
1answer
23 views

Vim - mapping for moving between buffers silently

in my .vimrc I have the following mapping to move between buffers: nnoremap <silent> <C-b> :bp<CR> nnoremap <silent> <C-n> :bn<CR> This mapping works but it ...
0
votes
1answer
37 views

Can't remap ctrl or alt combinations to commands

In Vim, I am ttempting the following remaps: nnoremap <A-1> :make<CR> inoremap <A-1> <Esc>:make<CR>i Basically, I want to remap alt+1 to :make. However, this remap ...
1
vote
1answer
75 views

Vim - How Recognize Spaces as Tabs (set listchars=tab)

I wonder if it is possible to use a configuration for that command "set listchars=tab:▒░,trail:·" to "see" 4 spaces as tabs and get the effect of the picture below (using real tabs)... I use the ...
2
votes
2answers
88 views

How can I construct a vim keymapping that inserts the current date?

I'm trying to create a vim keymapping that will initiate the creation of a new file, with the name of the file prefixed with the current date, waiting for me to finish typing the filename. Put more ...
0
votes
1answer
8 views

Conflicting hlsearch colours vim

I've switched from the basic theme in terminal to a customized one. The colour issue I'm having with incompatible colours is with hlsearch. Is there a way to change the colour of the highlighted ...
1
vote
1answer
321 views

Vundle - Plugins installed but not loading

I've installed vundle on my ubuntu box but when I load vim none of the plugins load. My vimrc: runtime! debian.vim set nocompatible " be iMproved, required filetype off ...
0
votes
1answer
122 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
59 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
91 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
26 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
28 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
75 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
56 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
95 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
62 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
558 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
744 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
141 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
140 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
43 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
43 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
100 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
210 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
68 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
54 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
58 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
58 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 ...
1
vote
2answers
237 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
51 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
71 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
169 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
215 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
95 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
46 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
94 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
99 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
143 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
92 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
85 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
442 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
117 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
84 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
166 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 ...
3
votes
1answer
494 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?