Plugins: Overview

Vim compatibility

Vim has a large number of plugins available. There are plugins for almost everything: for different filetypes, color schemes, new commands or new features. Vem is compatible with most of them. The only plugins that may encounter an incompatibility are those that remap keys that are already mapped by Vem.

Most well written plugins take a lot of care to not to interfere with key mappings that the user may have defined. That's why most of them start their key mappings using the <leader> key (by default backslash \ both in Vim and Vem). If a plugin defines key mappings starting with <leader>, it should work in Vem as it does in Vim. However, some plugins don't follow this best practice. In those cases, they may override a key mapping set up by Vem and then, some Vem actions can make some actions to get altered or, directly, unreachable.

Plugin installation

Installing plugins is pretty easy. Just place them inside this folder (create it if it doesn't exist yet):

~/.config/vem/pack/plugins/start/

Vem will load all plugins present in this directory at startup.

For example, to install vim-eunuch you can do:

# only required if the start folder doesn't exist
mkdir -p ~/.config/vem/pack/plugins/start

cd ~/.config/vem/pack/plugins/start/
git clone https://github.com/tpope/vim-eunuch.git

Take the following into account when managing your plugins:

  • Plugins are loaded at startup time, that means that you need to restart Vem any time you add or remove plugins for the changes to make effect.

  • If you add plugins to the start directory by directly cloning them from their repositories. That way you can pull changes every time that you want to update one.

  • To delete plugins, it is only necessary to delete their directories and restart Vem.

  • Plugin configuration options in Vem can be set in your vemrc file, instead of vimrc file, which is the one used in Vim.

  • Inside pack/ you can have multiple directories to group plugins. For example, you could have pack/foo/start/ and pack/bar/start simultaneously and the plugins of both directories will be loaded when you start Vem. Using pack/plugin/start/ is just a suggestion.

Help tags

If you want to be able to browse the documentation of the installed plugins using the :help command, you have to instruct Vim/Vem to parse the plugin help files first. To do that, execute:

:Helptags

It can be a good idea to execute this command every time that you add or remove plugins.

Included plugins

Internally, Vem uses a selection of plugins to provide certain parts of the functionality and looks. These plugins are included with Vem in their unmodified versions and can be used and configured by the users directly without having to install them: