Questions tagged [vim-plugin]

The Vim text editor is extensible through plugins, which can be categorized into general utilities, color schemes, file type-specific settings, and syntax definitions.

If your question is not about programming, consider posting Vim related questions at the dedicated Vim Stack Exchange site.

The Vim editor can be extended through plugins, which are (at least partly) implemented in Vimscript.

Plugins may add a new color scheme, syntax highlighting for a new language, or settings and commands specific to a particular file type. But most plugins offer general add-on functionality that either enhance the use (like the various buffer and file explorers), or integrate with related tools (like revision control systems).

The main repository of Vim plugins is at vim.org. There's a prolific community of plugin authors and a wealth of different plugins. Some plugins are only available on sites like Github or Bitbucket.

1236 questions
8
votes
2 answers

Is there a Vim command to undo the last motion, e.g. j or Ctrl-f?

In Vim, if I issue a jump command, e.g. G, then I can put the cursor back where it was before the jump by using Ctrl-o. However, Ctrl-o would not put my cursor back to the previous spot if I issued a movement command like 40j or Ctrl-f, since they…
Christian Abbott
  • 6,497
  • 2
  • 21
  • 26
8
votes
3 answers

Vim plugin for automatically generating Python import statements (without using Rope)

I've seen similar questions asked before here and here, however they are 4 years old and did not yield answers that matched my requirements. If I type Python code into Vim, for example: os.path.join('my', 'path') resp =…
Christian Abbott
  • 6,497
  • 2
  • 21
  • 26
8
votes
2 answers

Can't get CtrlP to set working dir as root folder

Im working on project that is in fact composed of several subproject, under a common git repository: Project - Sub Project A - Sub Project B - ... I never work on the main folder, and always start from one of the sub projects, the problem…
Luis Martins
  • 1,421
  • 2
  • 18
  • 32
8
votes
2 answers

Vim airline branch not showing

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…
user1494994
8
votes
3 answers

Push a location to the jumplist

My vim plugin has a command to jump to a different location (just like tags). I use the cursor function for that. How do I record the previous location in the jumplist, so that Ctrl+O works as expected?
Roman Cheplyaka
  • 37,738
  • 7
  • 72
  • 121
8
votes
1 answer

Vim - How to make your own mapping repeatable?

I have following mappings in my vimrc: nmap h1 yyp$r= nmap h2 yyp$r- I'd like to repeat h1/2 with . There exist the repeat.vim plugin by Tim Pope with following usage line silent! call…
Hotschke
  • 9,402
  • 6
  • 46
  • 53
8
votes
2 answers

How can I tell git which vim to use?

When I edit a commit message with vim (by entering git commit), vim opens, but first with a prompt that the YouCompleteMe plugin is unavailable: $ git commit YouCompleteMe unavailable: requires Vim 7.3.584+ Press ENTER or type command to…
Travis Northcutt
  • 24,666
  • 9
  • 42
  • 51
7
votes
2 answers

Plugins in gVim not working

I need help in installing some of the popular plugins in Vim. I just started learning this editor and is very excited to use the popular plugins. I'm using gVim in Windows XP and have extracted the .vim files and copied them to the Program Files…
Panoy
  • 173
  • 1
  • 3
  • 11
7
votes
4 answers

How can I compile gVim under Ubuntu?

I am trying to install the codecheck plugin for gVim, but to do so I must compile gVim with the plugin. On apt, every apt-get source to a gVim package downloads the normal Vim source, so I guess compiling the GUI must be a configure option. However,…
Martín Fixman
  • 9,055
  • 9
  • 38
  • 46
7
votes
3 answers

Vim for Windows: Python doesn't load properly / “crashes”

I've been struggling for 2 days to install some plugins which use python on Vim (Windows). Even with a stock vimrc. Using the official vim 7.4 binary (x86) I've checked that it comes with +python/dyn and +python3/dyn I've installed Python 2.7.10…
D.Naesuko
  • 455
  • 1
  • 4
  • 13
7
votes
3 answers

Prevent cursor jumping to bottom when the buffer is replaced

I have content stored in a variable (out) which I want to replace with the current buffer. I'm currently doing it like this (simplified version): let splitted = split(out, '\n') if line('$') > len(splitted) execute len(splitted)…
Fatih Arslan
  • 16,499
  • 9
  • 54
  • 55
7
votes
3 answers

How to setup YouCompleteMe for kernel and device driver development?

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…
max
  • 2,627
  • 1
  • 24
  • 44
7
votes
1 answer

how to autocomplete options in vim command mode

my setting for command mode completion is: set wildmenu set wildmode=longest,list,full currently when i type :set fdm= in command mode, then press tab, manual appended, if i Press tab again , character ^I appended, what i want is manual changed…
dfang
  • 1,366
  • 15
  • 41
6
votes
4 answers

Show Marks plugin causes marks to 'pop in' after around 4 seconds

I am using the Show Marks plugin in vim to display where the marks are. The displayed marks can be toggled on/off with the \mt command. When I first open a document the marks are off like so: Then about 4 seconds later with absolutely no action on…
puk
  • 16,318
  • 29
  • 119
  • 199
6
votes
2 answers

How to open or close NERDTree and Tagbar with \?

I want \ to open or close NERDTree and Tagbar, under the following conditions: Only close both if NERDTree and Tagbar are both opened Open both if NERDTree and Tagbar are closed OR if one is already opened So far, in VIMRC, I have: nmap…
Christian Fazzini
  • 19,613
  • 21
  • 110
  • 215