Vim's configuration file.

learn more… | top users | synonyms

0
votes
1answer
22 views

Wordskip in vim [ssh from mac to linux]

Word skip (ctrl key and arrow keys) work fine with vim on my mac in terminal. But, when I ssh from my mac to my linux box, ctrl and arrow key do not work (wordskip) instead delete a bunch of lines ! ...
1
vote
1answer
31 views

YouCompleteMe set flags for filetype

let g:syntastic_c_compiler = 'clang' let g:syntastic_c_compiler_options = ' -ansi -pedantic' let g:syntastic_cpp_compiler = 'clang++' let g:syntastic_cpp_compiler_options = ' -std=c++11 -stdlib=libc++ ...
2
votes
1answer
39 views

How to include all Vim config files in some folder?

I want to reorganization my vim directory to be like this: - dotfiles |- vim | |- config | | |- global | | | |- basic.vim | | | |... | | |- plugins | | | |- ctrl-p.vim | ...
0
votes
1answer
15 views

vim: Mapping from .vimrc not applied

In my vimrc, i mapped nnoremap <tab> >> and nnoremap <s-tab> <<. The second mapping works fine, the first one however seems to be forgotten. If i map it manually when in vim, ...
0
votes
0answers
18 views

Hide buffers not tied to a file from bnext/bprev buffer list

I love VIM buffers and do use :bnext and :bprev to navigate my buffer list. I even have mapped them to <tab> when in normal mode. Simple and convenient: " Maping next/prev buffer to <TAB> ...
0
votes
0answers
31 views

vim mouse wheel scroll to move cursor but NOT screen viewport

I see plenty of results on Google for how to use the mouse wheel to scroll the visible text in a terminal running vim without changing the cursor position. But I can't find out how to move the cursor ...
0
votes
3answers
51 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
18 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
90 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
68 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
33 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
57 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
24 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
43 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
157 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
95 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
10 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 ...
2
votes
1answer
653 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
216 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 ...
4
votes
1answer
69 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
119 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
31 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
93 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
61 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
121 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
64 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
829 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
990 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
165 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
164 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
48 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
101 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
295 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
72 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
62 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
63 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
60 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
283 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
54 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
86 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
198 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
301 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
145 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
52 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
98 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
106 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
162 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
123 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> ...