We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [plugin-system]

Vim's plugin system. NOT for questions about a specific plugin (use the appropriate plugin-* tag) or questions that may require a plugin.

Filter by
Sorted by
Tagged with
108
votes
4answers
29k views

What is the Vim8 package feature and how should I use it?

Vim 8 was released today and the release notes mentions a new "package" feature. What is it and how should I use it? Most importantly, does it replace the good old plugin managers?
97
votes
7answers
142k views

How do I install a plugin in Vim/vi?

How do I install a plugin in Vim? Does it matter: Whether I use vi or Vim? Whether I use gVim? Which version of Vim I'm using? What my OS is?
21
votes
5answers
1k views

GitHub for .vimrc and plugins

I know many people store their .vimrc on GitHub to make it easier to get right to work on new machines, and that makes complete sense to me. Including plugins, however, is problematic, because the ...
21
votes
2answers
5k views

How can I redefine plugin key mappings?

I have installed a plugin that doesn't provide a mechanism to disable the key mappings it defines. I want to redefine one of the mappings (<leader>cc) defined by the plugin for my own pursope, I'...
20
votes
1answer
499 views

Why aren't Vimballs commonly used?

I have seen that a lot of Vim Plug-ins don't seem to have Vimballs. Vimballs were/are basically a tarball for a plugin that vim knows how to install. They were/are thus slightly more convenient that ...
19
votes
1answer
180 views

Figure out which plugin is responsible for a key binding

I was about to answer a question but realized that my answer depends on a key binding provided by a plugin I have installed. Even worse, I don't know which plugin provides it. The only way I know to ...
15
votes
5answers
6k views

Settings and plugins when root (`sudo vim`)?

It's really frustrating when I need to edit a file as root and use sudo vim somefile.conf and I can't use any of my keybindings and settings and plugins. Is there a way to get all my customizations ...
15
votes
2answers
3k views

What makes a plugin Vundle compatible and are other plugin managers interchangeable?

For a long time now I've been using Vundle to manage my vim plugins. As best I can make out this basically just organizes plugins in an isolated directory structure and keeps track of updating them ...
14
votes
5answers
10k views

How to see if a plugin is active

How can I determine if a filetype plugin (such as vim-latexsuite) has been installed and activated when I open the appropriate file? Another popular editor would indicate that the relevant "minor mode"...
13
votes
2answers
4k views

How to conditionally load plugins

I was searching for an answer to this, but haven't found anything yet, so if I missed something obvious, I apologize. I thought it would be a quick google search away, so maybe it's more complicated ...
13
votes
2answers
1k views

Detect most resource hungry plugin

I have some plugins installed for vim, I would like to know how can I find out what plugin uses most resources (CPU, RAM) ?
11
votes
2answers
1k views

Is it possible to use a delegate or to pass a function as argument in Vimscript?

I am trying to create a small plugin to learn vimscript, my goal is to create some functions processing a selected text and replacing it with the result. The script contains the following items: Two ...
11
votes
1answer
289 views

Experimenting with vim/gvim in “virgin” mode

Sometimes, I would like to try a trick I find in the internet. It is often helpful to try this in vim (gvim if it is a gui trick), in virgin mode, i.e., without loading all my ~/.vimrc stuff. Do you ...
11
votes
1answer
873 views

What is a Vim plugin?

I understand that we can extend the power of Vim in order to add new features or modify existing ones and enhance our editing experience. Although being myself a Vim user for quite a long time, I am ...
10
votes
2answers
4k views

How do I install a .vimball Plugin?

I was given a plugin for Vim. It came in something called a .vimball. What am I meant to do with this exactly? Where do I put it? Do I need to be root to install it?
9
votes
3answers
2k views

Elegant way to support both python and python3 in vim plugin

I recently received a pull request to change my vim plugin to make it support python3. But these changes break the plugin for the vim on my Mac which seems to listen to python. python import sys ...
9
votes
2answers
2k views

Gundo plugin requires python 2.4 when version 2.7 is installed

I have Python 2.7.9 installed. And now I get the message that the Gundo plugin requires 2.4. Is there a workaround? Here is my vimrc file: set nocompatible " be iMproved, required ...
8
votes
1answer
572 views

When should I use vim-addon-manager instead of a regular package manager?

On Debian based systems, there is a package named vim-addon-manager. My understanding is that it allows to install some plugins based on a repository of available plugins. To be able to install them, ...
8
votes
2answers
519 views

How safe is it to use an unknown `_vimrc` or `vimscript` file?

I do not know if this question should be asked here or not. In almost every language, malware exists. Is the same also applicable for vimscript? Suppose vim is running with high system privileges. Is ...
8
votes
2answers
1k views

Summary of functions in current file?

While working in various source files, (C, Ruby, etc.) I find that I'm often hunting around for functions. Is there a way to have an auto-generated HUD that lists the structure of the current file? It ...
7
votes
2answers
844 views

Drawbacks of using Python to develop new code in a VIM plugin

In one of the vim plugins I use, we have been thinking about using python vs vimscript going forward (https://github.com/python-mode/python-mode/issues/813#issuecomment-344754563). I understand that ...
7
votes
2answers
1k views

How to design a command in a plugin that can be called from vimrc

I'm working on a plugin that allows users to create custom operators. The operators would apply a VimL expression to the motion or text object that the operator moves over. Keeping a clean user ...
7
votes
1answer
158 views

What is the current 'best practice' for persistent preferences for a plugin?

I have a plugin (a unite sub-module) that filters extremely large textfiles down to generate a helpful 'table of contents'. I would like to provide the user with the ability to enable/disable many of ...
6
votes
2answers
1k views

How to patch add in Fugitive plugin

This screen I got after running the :Gstatus command Then I moved the cursor to init.vim file and pressed the p key, i.e. run git add –patch for the current file. Now I have this screen As you can ...
6
votes
2answers
131 views

How to identify all the loaded ftplugins for the current file?

I have installed a lot of plugins and each may has its own ftplugin settings. What is the way to find out all ftplugin scripts that have been sourced for the current buffer? Just to summarize the ...
6
votes
2answers
2k views

In my vimrc how to test if a plugin is installed?

My use case is the following, but I think a general solution, working for as many plugins as possible would be preferable: I use the submodes plugin to create a submode handling windows. In my .vimrc ...
6
votes
1answer
562 views

Setting syntax in ftplugin

I’m trying to set the syntax of Processing files (*.pde) to java with a ftplugin. .vim/ after/ ftdetect/ pde.vim ftplugin/ processing.vim In after/ftdetect/pde.vim I ...
6
votes
0answers
801 views

Resources for scripting vim with python [closed]

I love vim, I love python, and I dislike vimscript. So I would like to know how to write plugins (or throwaway scripts) for vim in python. Of course, the first reference should be :h python, but I ...
5
votes
1answer
117 views

Add plugin directory

When I install plugins, I like to keep them organised in folders. For example, I have downloaded plugins that turn vim into a programming IDE. This file contains 16 folders and files which are ...
5
votes
1answer
1k views

Vim to edit and submit to [Hackerrank]

HackerRank.com allows to solve their own set of programming problems with an online editor wich supports Emacs, Vim and 'Normal' modes. The Vim mode can't really replace a customized local vim and ...
5
votes
1answer
469 views

How can I prevent plugins from overwriting my key mappings?

In my vimrc I have: nnoremap <F4> :SyntasticToggleMode<CR> And this works. But I also have the unicode.vim plugin installed, which overrides this mapping: if !hasmapto('<Plug>(...
4
votes
2answers
235 views

Why does Vim load unrelated ftplugins?

When I open a file with .md extension, the filetype is set to markdown, as expected. But the ftplugin for HTML is also loaded as I can see since I have some insert mode mappings in there to auto-...
4
votes
1answer
153 views

Why vim plugins have a check on &cp

I'm trying to wrap my head around vim plugin development and I see a constant check on a variable to see if the plugin has already been loaded like: if exists('g:loaded_plugin') || &cp finish ...
4
votes
1answer
3k views

Using vim-addon-manager

I just downloaded and installed vim-addon-manager using sudo apt-get install. I'm not sure what to do next, I entered vim-addon-manager at the bash prompt (Ubuntu 14.04). Here is the output: ~$ vim-...
4
votes
1answer
3k views

installing vimtex?

I am trying to install vimtex, and I am not how to do that. What plugin manager should I use? How do I combine it with "vim-surround"? "snipmate"? I went through the readme file, but could not ...
4
votes
1answer
291 views

Vim Pandoc & Headers

When using vim-pandoc, I'm having some funny behavior with headers: For instance, if I position the cursor on a word and press v-a-w and then <localleader> - i, I get italics. if I position ...
4
votes
1answer
1k views

How to load plugins from my vimrc and from another file?

I have my dotfiles synchronized on github which is a current practice. As I use several machines I want to be able to have some part of my configuration not synched on my github repo. To do so I ...
4
votes
1answer
458 views

neovim: autocompletion on user defined command plugin

I am write a plugin for neovim in python using this client and I looking for a way to offer completion when executing a command. I have look at the following example to structure my plugin. As an ...
3
votes
2answers
348 views

Easiest way to insert LaTeX matrix?

Recently I found myself in a situation that need to type in quite a number of matrices to LaTeX by hand, so I was wondering if there are some tools that can help me to save some keystrokes. The ...
3
votes
3answers
1k views

How do I prevent Vim from loading plugins on older configurations?

I have a couple of plugins that don't work correctly on some machines running earlier versions of Vim. Is there a way to supress the Error detected while processing... errors when I start up vim in ...
3
votes
2answers
435 views

Vim plugin to help with surrounding things in brackets, quotes etc

First of all I want to say that I know and use delimitmate and surround-vim. And while they work pretty well, there is room for improvement. I'll explain what I mean. Suppose I'm writing the code ...
3
votes
1answer
352 views

Plugin help files not found

I am on windows 10 and installed pathogen into home/vimfiles/autoload, and as far as I know all went well. Following the directions here, I installed nerdcommenter. I restarted gvim, tried :help ...
3
votes
2answers
464 views

Selectively enable a subset of vim plugins for specific category of workflows (plugin virtualenv for vim projects)

I use vim for many different categories of projects, typically: Writing code (3 languages, python, Matlab and C) Writing documentation ( .rst, .html) Writing reports (.tex) Readme file (.md) As a ...
3
votes
2answers
208 views

How to declare commands local to a plugin?

Writing a vim plugin, I can use function! s:InternalMethod() endfunction for InternalMethod to be local to the plugin environment. It will not be directly available to users nor overwrite their ...
3
votes
2answers
2k views

Can't get deoplete plugin working in Neovim

I have installed deoplete plugin into my Neovim using dein. I have put let g:deoplete#enable_at_startup = 1 into my init.vim and I can see the autocomplete list when I type in the insert mode - so far ...
3
votes
1answer
725 views

Vim zebra line coloring?

Is there a plugin or way for me to alternate the background color for each line in vim? E.g. Previously I'd found vim-zebra but this looks really ugly: I'd prefer the whole line to be colored, not ...
3
votes
2answers
360 views

How do I list my current vim plugins without opening vim?

For example, if I execute the following command from the terminal: vim -c PluginList this command opens vim and lists my currently installed plugins. How do I execute the above command but ...
3
votes
1answer
2k views

In what order does Vim read ftplugin files, syntax files, and the .vimrc when the commands (e.g. set syntax=mysyntax, filetype plugin on) are called?

I've had some issues lately reconciling my .vimrc with files in ftplugin and after/ftplugin. In what order are all these things read? For example: when I call in my .vimrc the command plugin filetype ...
3
votes
1answer
553 views

Using the same plugin folders for gvim and with vim in cygwin

I have a cygwin shell in my windows computer and it has a Vim installation of its own in it. And, so the plugins I have for Gvim are not available for the Cygwin vim. I tried symlinking the plugins ...
3
votes
1answer
869 views

Mapping with square bracket

I am looking at some plugin that happens to be configurable through a curious mapping (e.g. unite.vim): More advanced configuration example: > " The prefix key. nnoremap [unite] <...