FAQ Database Discussion Community


more about vimrc configuration [closed]

vim,vim-plugin
I am new to Vim and after using it for about 3 days i am in love with it. I used sublime-text before this and i decided to try vim because i heard a lot of people (maybe some) hate and love it. I know that learning Vim require time...

How to stop Vim from writing onto system clipboard when visually selecting texts

vim,vim-plugin
I am using Vim 7.4.423 on a Windows 7 machine. I notice that Vim will copy to system clipboard of whatever texts that I have "highlighted" through Visual mode. Is there a way to stop him from do this? The "overwriting of clipboard upon enter visual mode" does not differ...

Does “mkview” keep a record of `fdm` and `formatoptions`? If so, how to refresh it?

vim,vim-plugin
I am having trouble with the following script written in Vim (by Yichao Zhou (); source: http://www.vim.org/scripts/script.php?script_id=4021). The question breaks down to details related with mkview and loadview in Vim. When having this plugin installed through Vundle, I cannot set fdm and formatoptions to be some new values. This plugin...

Add edit buffer alias to vim with directory mapping

backbone.js,vim,vi,vim-plugin
I want to add a custom mapping of VIM's edit buffer command but with a default directory mapping. Here is an example: I have a directory called javascript/backbone. Every time I want to access a file in this folder, I have to type the entire path. I want to do...

VIM: autocomplete plugin to work with gtags

vim,vim-plugin
I have just moved from ctags to gtags for my huge C Project. But I couldnt find any vim autocomplete plugin that works with gtags. gtags is so widely used and much more efficient than ctags. I am sure I am missing something here. Someone must have integrated gtags with...

VIM - Reformatting indentation and braces

vim,coding-style,vim-plugin
When working with blocks of code in VIM, I'm able to easily re-indent blocks of code via selecting a region in visual mode (SHIFT+v), then just hit =. This re-tabs lines of code, uses the correct indentation depths, hard-tabs vs spaces, etc. I have a large set of functions I...

Vim says 'missing :endif', but I'm sure its there

vim,vim-plugin
Consider the following vim code. function! s:foo() if s:bar() let a = 1 endif endfunction function! s:bar() python << EOF vim.command('echoerr "blabla"') EOF endfunction command! Foo call s:foo() map <F7> :Foo<CR> Open a vim session and press F7. Vim wil then throw an error saying E171: Missing :endif. How is...

How to setup YouCompleteMe for kernel and device driver development?

c,vim,linux-kernel,vim-plugin
I would like to setup vim for kernel hacking so I have installed YouCompleteMe for auto completion. However, no matter what I do It looks like I can't configure it properly. It does not do semantic completion properly; It only suggests the semantics already used in the current file not...

Is there a Vim “training wheels” plugin for displaying available shortcuts similar to nano

vim,vim-plugin
I'm a long time user of GUI IDEs like PhpStorm but I see the value in learning a CLI editor like Vim for when tapping into remote servers. I'm learning commands on a need-to-know basis, but I'd like to see common possible keystrokes similar to how the Nano editor does...

Vim airline branch not showing

vim,vim-plugin,vim-fugitive
I've installed bling/vim-airline hoping I could have that cool branch name in my status bar. I followed the instructions on airline's repo and installed tpope/vim-fugitive. But after downloading, installing, modifying and restarting vim, I just couldn't get the branch on the status bar. Instead I've got: I'm suspecting something was...

vim: disable plugin by default (diffchar)

vim,vim-plugin,vimdiff
Recently (vimdiff: force line-by-line comparison (ignore supposedly missing/additional lines) ), I've found the quite useful vim plugin diffchar, which improves vimdiff by showing multiple diffs on the same line separated, instead of highlighting the whole area from the first to the last diff. The problem is that I frequently encounter...

vim using “cscope find s” command and open result in new tab instead of window

vim,vi,vim-plugin,cscope
I use cscope command :cs find s someFunction and i see the long list with this function appearance, I find that I'm interested in list and open it, vim opens a file in a new window, I want to open file in a new tab. I found several similar questions,...

Vim: contradictory key-mappings in a setting with long soft-wrapped lines PLUS reletivenumber

vim,vim-plugin
It is a headache to have the following two options enabled at the same time: " Line numbering. set number set relativenumber " The master setting (with wrapping) set wrap set linebreak set nolist " list disables linebreak set textwidth=0 set wrapmargin=0 set formatoptions+=l "No reformatting while typing on the...

How can I customize “comment marker” in Vim

vim,vim-plugin,vim-syntax-highlighting
When setting the formatoptions to include the o flag, pressing o or O on a commented line will "inherit" the leading comment marker. However, for Stata, only \\ had been recognized as a "valid comment". The other two types of commenting had been ignored, by the set formatoptions+=o. May I...

What is the difference between vimrc and vimruntime

vim,vim-plugin
I downloaded the vimrc from amix/vimrc which is very helpful for starting out in vim. But as I try to edit the .vim_runtime I keep getting errors. Here is my .vimrc set runtimepath+=~/.vim_runtime source ~/.vim_runtime/vimrcs/basic.vim source ~/.vim_runtime/vimrcs/filetypes.vim source ~/.vim_runtime/vimrcs/plugins_config.vim source ~/.vim_runtime/vimrcs/extended.vim try source ~/.vim_runtime/my_configs.vim catch endtry Now I wanted to...

Moved .vimrc in a new dir, trying to get it to work

vim,macvim,vim-plugin
Disclaimer: I'm new to vim/tmux. I'm on a Mac using MacVim I was told to use version control on my dotfiles. Before my dot files were all placed in my root ~ like so: ~/ .vimrc .tmux.conf .vim /bundle /autoload .viminfo etc But then I figured it would be a...

Wrapping of selected string

vim,vim-plugin
I'd like to create hot key for wrapping of selected line. Ideally it should work like in this example: Selection of string: ":include => [:profile => :user]" Pressing of F6 key Selected string should be modified to "lambda {{ :include => [:profile => [:user]] }}" I've implemented following solution: nmap...