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

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

A first important note is about the vocabulary: In Vim8 a package is defined like this: A Vim package is a directory that contains one or more plugins. This means that the new package manager was created to help users manage all of their plugins in the same archive.

How do I load a plugin into Vim?

Any plugins installed into opt are available to Vim, but they’re not loaded into memory until you add them to a session with the packadd command. For example, to load an imaginary plugin called foo: Officially, Vim recommends that each plugin project gets its own directory within ~/.vim/pack.

Where do I drop my package in Vim?

With packages, you can just drop your package (plugin) in Vim’s designated directory ( pack/ ). This makes it easy to update. Many Vim plugins are in Github repo. When they come up with a new version, you only need to go to that directory and git pull latest version.

Do you need to run packadd every time you start Vim?

You need to run packadd everytime you start Vim. If you close and reopen Vim, your package won’t be available immediately. Alternatively, you can also add in your vimrc: The ! is for when you run vim –noplugin so Vim won’t add your package.

How to generate a helptag in vim8?

The Vim8 commit introduced two line in the helptag doc: :helpt [ags] [++t] {dir} Generate the help tags file (s) for directory {dir}. When {dir} is ALL then all “doc” directories in ‘runtimepath’ will be used. Which means that the new package manager ease the generation of the helptags put in the user archive.

Is it safe to ignore help tags in Vim?

Which is safe to ignore. Vim will continue generating helptags after this error (check the output of :100verbose :helptags ALL if you don’t believe me). For adding packages in the opt directory as well, you can use (based on Peter Rincker’s comment):

Where do I put my plugins in Vim?

Within this folder a further folder start is needed to hold plugins. Vim will pick up any packages added to this folder and automatically load the plugins. Optionally another folder opt may be created to hold packages that are not loaded automatically. Packages added in the opt folder may be loaded using

Why is plugin management a pain in Vim?

Plugin management for vim used to be a pain in the traditional way by spreading plugin files across the whole personal vim runtime directory, eg. ~/.vim for *nix system. Once a plugin is installed, it is hard to be updated because there is no easy way to remove the outdated plugin files which is a necessary step.

How does VAM work as a plugin manager?

VAM provides almost everything needed to be plugin manager: places plugin files in its own directory, loads plugins at vim startup, searching/installing/updating/removing plugins in ex command line, written in pure VimL, maintains its own plugins central info database, even resolves the plugin dependencies.

How does Vundle manage plugins in vimrc?

By having needed plugins declared in vimrc, vundle handles all the rest, including installing/updating and removing plugins, through the ex command line interface. Most importantly, vundle is implemented in pure VimL. With the help of vundle, managing vim configuration across several computers could be done with just a simple vimrc file.