Skip to main content
Share Your Experience: Take the 2024 Developer Survey
110 votes
Accepted

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

First of all, the relevant documentation can be found with :h packages on the newly compiled Vim8 version and here on Github. A first important note is about the vocabulary: In Vim8 a package is ...
statox's user avatar
  • 50k
42 votes

How do I install a plugin in Vim/vi?

Vim 8+ / Neovim Version 8 introduces a new packages mechanism that largely replaces the need for existing plugin managers (pathogen, vim-plug, vundle, etc.) at the time of writing (2017). From the ...
Michael Kropat's user avatar
29 votes
Accepted

How to patch add in Fugitive plugin?

Short Answer Just use the normal interactive buttons. In (regular) vim, pressing p drops you into the interactive terminal patch, so it's the interface you're used to. For neovim users: Just enter ...
D. Ben Knoble's user avatar
  • 26.4k
24 votes
Accepted

How to see if a plugin is active

How can I determine if a filetype plugin (such as vim-latexsuite) has been installed You could use :scriptnames which list all sourced files. Another option is to check for the variable indicating ...
mMontu's user avatar
  • 6,640
23 votes

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

The answer provided by @statox is very descriptive, but for a new user that can be overwhelming. Instead I want to outline what you need to do in step-by-step pointers. Create pack/*/start directory ...
3N4N's user avatar
  • 5,754
22 votes
Accepted

How to conditionally load plugins

You can do this with Vim-Plug. See the README: " On-demand loading Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' } Plug 'tpope/vim-fireplace', { 'for': 'clojure' } I think you'll have to use ...
statox's user avatar
  • 50k
18 votes

vim hangs when I open a typescript file

tldr; Add set re=2 into .vimrc prevents the issue on mac. I'm not sure why.
mrjarone's user avatar
  • 359
16 votes
Accepted

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

N.B., I'm one of the original authors of Debian's vim-addon-manager (which I'll refer to as dvam for the rest of this answer, to avoid confusion with Marc Weber's vam). dvam is intended solely to ...
jamessan's user avatar
  • 11.1k
15 votes

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

To expand on the "can it replace plugin managers", I used to use Vundle, which was fantastic, but now have replaced it with 18 or so lines of bash. I find it useful to use subfolders in the pack ...
Cam's user avatar
  • 251
13 votes

How to patch add in Fugitive plugin?

Here's another way to do it, all within fugitive. I believe some of this is new with the 3.0 release on Aug 20, 2019. Someone had created a "What's New?" video, which I sadly can't find now. ...
Phil R's user avatar
  • 503
12 votes
Accepted

how to load vim8 optional packages in vimrc?

how to load vim8 optional packages in vimrc? The way to load vim8 optional packages in your vimrc is to use the :packadd! command, which will add them to your 'runtimepath', which will make the opt ...
filbranden's user avatar
  • 28.9k
11 votes

vim hangs when I open a typescript file

From :help 're': *'regexpengine'* *'re'* 'regexpengine' 're' number (default 0) global This selects the default regexp engine. |two-engines| The possible ...
D. Ben Knoble's user avatar
  • 26.4k
10 votes
Accepted

Plugin help files not found

you have to create the help-tags. Run :helptags for the dir where you installed the docs. On unix this would most likely be :helptags ~/.vim/doc. Or simply recreate them all with :helptags ALL
Naumann's user avatar
  • 2,759
10 votes

Easiest way to insert LaTeX matrix?

Honza's UltiSnips Snippet gentbl<number>x<number> available in the repository https://github.com/honza/vim-snippets/blob/master/UltiSnips/tex.snippets Using this snippet which uses the ...
Hotschke's user avatar
  • 4,770
10 votes
Accepted

Auto back-indent word 'else' in if/else statement in Vim

Let's start from the beginning. There are quite a few (local to buffer) options in Vim to work with indenting. autoindent is the most basic setting; it simply makes a new line to have an equivalent ...
Matt's user avatar
  • 20.8k
9 votes

How to conditionally load plugins

Instead of calling execute pathogen#infect() to load all plugins, call pathogen#interpose for every plugin, i.e.: execute pathogen#interpose('bundle/unicode.vim') execute pathogen#interpose('bundle/...
Martin Tournoij's user avatar
9 votes

How to see if a plugin is active

One way is to do a regex search on runtimepath: if match(&runtimepath, 'MY-PLUGIN') != -1 " ... endif If you're using vim-plug, here's a general purpose method to check: function! ...
Mateen Ulhaq's user avatar
9 votes
Accepted

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

TL;DR: Requiring +python/+python3 support for a python based development plugin. That sounds completely reasonable. About Vim plugins and human behavior Generally, speaking humans want things to ...
Peter Rincker's user avatar
8 votes

How do I install a .vimball Plugin?

:UseVimball path instead of :so [name].vba for vim8-packages/dein/vim-plug/minpac If you use vim8 pack paths or a plugin manager which supports local plugins (e.g. dein or vim-plug), you might want ...
Hotschke's user avatar
  • 4,770
8 votes

How to see if a plugin is active

If you use vim-plug, it sets a variable called plugs which lists all your loaded plugins, and some information about them. I solved your question for myself when I needed to check whether I was ...
Max Coplan's user avatar
8 votes
Accepted

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

I don't know of a direct way to get a list of only the things loaded for the current buffer based on filetype, but :scriptnames will list everything that's been loaded, including system/default ...
Jim Stewart's user avatar
8 votes
Accepted

Why do plugins check v:version < 700?

v:version specifies your current version of Vim. Version 7.0 has version 700, 7.2 has version 702, etc. Now, version 7 was a very major release with many enhancements to the previous release 6, that ...
Christian Brabandt's user avatar
8 votes
Accepted

How to customize colorschemes without editing their source files?

The AfterColors plug-in (GitHub mirror) provides an after-directory auto-loading mechanism for color schemes. This can however be easily achieved in modern Vim by using the ColorScheme autocommand ...
PiCTo's user avatar
  • 369
7 votes
Accepted

How to update vim plugins with pathogen package manager?

pathogen manages the run time path of Vim. It is not the same as vim-plug nor vundle. The differences between the vim plugin managers has many good answers. :-) How to use Tim Pope's Pathogen ...
StandardEyre's user avatar
  • 1,128
7 votes

How to see if a plugin is active

Vim plugins don't come with any activation indication, and in a proper setup, this isn't necessary. You can quickly check whether a plugin is active by querying for its side effects, typically ...
Ingo Karkat's user avatar
  • 17.9k
7 votes

Call function only when the plugin is loaded

Rather than have my ~/.vimrc load a plugin ahead of when it would normally be loaded, I usually solve this problem in one of two ways. Call the function in a ~/.vimrc/after/plugin/MyPlugin.vim file. ...
garyjohn's user avatar
  • 6,349
7 votes
Accepted

Why are inclusion guards used in vim plugins?

It allows the user to disable a specific plugin. See :h use-cpo-save, and search for NOT LOADING: NOT LOADING It's possible that a user doesn't always want to load this plugin. Or the ...
user938271's user avatar
  • 5,987
6 votes

Gundo plugin requires python 2.4 when version 2.7 is installed

Add this to your .vimrc if has('python3') let g:gundo_prefer_python3 = 1 endif I was getting similar error. The above worked for me (I am using Manjaro Linux, and installed community/python-...
Brij's user avatar
  • 161
6 votes

Using vim-addon-manager

Disclaimer This answer contains comments that are based on my experience and on the opinion that I got with the time, it might not be universal. I wrote this answer with keeping in mind the experience ...
statox's user avatar
  • 50k
6 votes
Accepted

Can't get deoplete plugin working in Neovim

Vim uses Ctrl-n (next item) and Ctrl-p (previous item), Ctrl-y (accept match) or Ctrl-e (cancel) and so on for completion. See :h ins-completion-menu and :h popupmenu-keys for details. The following ...
VanLaser's user avatar
  • 9,750

Only top scored, non community-wiki answers of a minimum length are eligible