Vim's configuration file.

learn more… | top users | synonyms

0
votes
0answers
19 views

How to setup in `~/.vimrc` a mapping for `colorscheme` to toggle `solarized` between `dark` and `light`?

How to setup in ~/.vimrc a mapping for colorscheme to toggle solarized between dark and light? Both background and colorscheme in ~/.vimrc are badly misbehaving! I have setup solarized to work on ...
0
votes
1answer
40 views

Vim error - E138: Can't write viminfo file

I have already checked several similar links but nothing worked. Before i explain the issue, i was earlier getting following message while saving any file: vim e509 Cannot create backup file (add ! ...
0
votes
1answer
44 views

Replace 8 spaces tabs with 4 spaces tabs

I added set tabstop=4 set softtabstop=4 set shiftwidth=4 to my .vimrc file. But tabs in my existing files are still taking 8 spaces. How can I update them?
1
vote
1answer
30 views

Execute Command on VIM Exit, And View the Output

I use vim for editing my PHP scripts, and I would like vim to automatically execute php -l on any *.php file that I exit to do a syntax check. I've set this autocmd in my ~/.vimrc file: autocmd ...
0
votes
2answers
19 views

How to show ident level on vim instead of tab markings?

my .vimrc shows vertical lines so i can follow identation blocks easily, like pretty much every single text editor/IDE. if(x == 1){ | if( y == 1){ | | y(); | } } is there any way i can make ...
-1
votes
1answer
26 views

Print tag folder in vim

I got this line in my .vimrc so that it look i parent directories untill it find a tag file. set tags=./tags; Is there a way to print the directory where vim found the tag file inside vim?
0
votes
0answers
7 views

MacVim cmd+a (select all) no longer works

I haven't tweaked my .vimrc for MacVim in a while. But I notice recently cmd+a no longer works. Instead it clears the buffer and types a g instead: When I go: :verbose nmap <D-a> It says: no ...
0
votes
1answer
16 views

vim user defined command: reopen current file for editing

I have a user defined command in vim that does a chmod on the current file. Once that's done, reopen the current file for editing (with the newly updated properties) by issuing: :e[dit]! I'd like ...
0
votes
0answers
26 views

Vim Background color issue

I want my vim background to be dark but as you can see it's not, its half black half grey, I'm using Ubuntu 15.10 with latest Vim version. How to fix this?
1
vote
0answers
36 views

.vimrc sourcing another leads to plugin errors

Since vim or vim-pymode does not seem to work with both python 2 and 3 at the same time I thought I make an alias for my newly compiled vim version specially for developing python 3. So I added this ...
1
vote
2answers
55 views

Vim; Shortcut to add comment at beginning of line

When I code, I tend to execute the following manually a lot after having selected multiple lines of code. :'<,'>s/^/#/ I want to add this to my .vimrc but I am having troubles making it work. ...
0
votes
1answer
39 views

Does resourcing my .vimrc unset the mark created when writing buffer?

The first line returns the cursor to the line i was on, the second sources the resource file. both work on there own but will not work together. The marks set by Return cursor seem to still be set, ...
1
vote
1answer
30 views

Vim Return to last point in file

can anybody provide an explanation as to what this is doing or point me to vimdocs? line("'\"") function! ResCur()$ if line("'\"") <= line("$") normal! g`" return 1 endif$ endfunction ...
0
votes
0answers
12 views

Cross-platform .vimrc/_vimrc [duplicate]

I use vim on windows (GVim portable off a USB stick) and Linux (standard command-line vim) and would like to synchronise my settings (_vimrc or .vimrc respectively). As far as I can see (I haven't ...
1
vote
1answer
232 views

Color scheme(s) in Vim not properly working

On Archlinux, using Vim 7.4 (installed with pacman), I tried to use the lucius color scheme. However, the moment I turned it on, all color went away. This happened in the Xfce Terminal emulator under ...
0
votes
1answer
112 views

Solarized color scheme did not come out as expected after installation

After I install solarized, the background color didn't come out as expected. vim uses terminal black background instead of using solarized's blue background. My terminal is also set to ...
0
votes
1answer
88 views

Stop Vim from automatically tw=78 line-break wrapping text files

I recently updated Vim, and noticed that whenever I open a .txt file, the option tw=78 is set. (Which makes Vim automatically break lines when they would have exceeded 78 characters.) I don't like ...
0
votes
1answer
59 views

How do I fold my .vimrc non-temporarily using vim code-folding? (sp13-vim)

I'm using spf13-vim, and I wanted to keep my vimrc folded into sections like this +------126 lines: Environment ...
0
votes
1answer
208 views

How to map ctrl/p clear cache and refresh NERDTree root node?

How do I map <leader>r which clears CtrlP's cache and refreshes NERDTree's root directory? Pseudo code, I have: map <Leader>r :CtrlPClearCache<cr>g:NERDTreeMapRefreshRoot<cr> ...
0
votes
0answers
53 views

Vim: mapping for <PageUp>, <PageDown> not working in vim, but working in tmux

Did a clean install a couple days ago, copied over my .vimrc and .tmux.conf, and now Ctrl-F / Ctrl-B doesn't page down / up in vim. Ctrl-F / Ctrl-B work in tmux when selecting text. Weirder still, ...
2
votes
1answer
36 views

Effectively manage sets of Vim settings

Is there any effective way to manage multiple sets of Vim configuration? I need this because I need different sets of configuration for different types of work. It depends a lot whether I'm writing a ...
0
votes
1answer
70 views

How to autocomplete python class in vim

In sublime text 3, if I'm editing a file.py and I type class it will automatically create this for me class ClassName(object): """docstring for ClassName""" def __init__(self, arg): ...
0
votes
1answer
41 views

Vim: Managing multiple wording alternatives

(After reading this, please suggest another wording for the question, because I couldn't come up with a better one) When writing and editing in Vim, whether texts for humans or texts for humans and ...
0
votes
1answer
103 views

The risk of vim -Z (rvim)

Last time I asked about the way to prevent risks caused by these configurations: user_name ALL=(ALL) /usr/bin/vim /etc/httpd/confs/httpd.conf or %group_name ALL=(ALL) /usr/bin/vim ...
2
votes
4answers
322 views

Vim copy/paste messing up indentaton

Whenever I copy something from another application and then go to paste it into vim, it messes up the indentation. For example, just now I tried to copy the manifest.json file from the hello-world ...
0
votes
1answer
26 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
210 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
135 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
48 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
3answers
201 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
155 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
96 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
98 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
42 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
236 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
36 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
112 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
480 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 ...
3
votes
2answers
151 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
27 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 ...
7
votes
1answer
4k 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
744 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
136 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
325 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
59 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
36 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
222 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
91 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
2answers
244 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
88 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. ...