Switching vim to use native package management
This documents how I switched to vim’s new native package management.
Based on this post, I decided to switch from pathogen to using native package management.
My .vim
directory tree looked like this:
.vim ├── after │ └── syntax ├── colors ├── indent ├── bundle │ ├── auto-pairs │ ├── syntastic │ ├── tabular │ ├── ultisnips │ ├── vim-abolish │ ├── vim-airline │ ├── vim-colors-solarized │ ├── vim-commentary │ ├── vim-dirvish │ ├── vim-fugitive │ ├── vim-indent-guides │ ├── vim-speeddating │ ├── vim-surround │ └── vmath.vim ├── spell ├── syntax └── usnippets
Under .vim
, created the directory tree for the packages.
> cd ~/.vim
> mkdir -p ~/.vim/pack/bundle/{opt,start}
Note that name “bundle” is arbitrary. Since I don’t have that many plugins and I want them all to be started, I’ll put them in a single directory tree.
Next is moving the plugins, and removing the autoload link for pathogen.
> cd bundle
> mv * ../pack/bundle/start/
> cd ..
> rmdir bundle
> rm autoload
The directory structure now looks like this:
.vim ├── after │ └── syntax ├── colors ├── indent ├── pack │ └── bundle │ ├── opt │ └── start │ ├── auto-pairs │ ├── syntastic │ ├── tabular │ ├── ultisnips │ ├── vim-abolish │ ├── vim-airline │ ├── vim-colors-solarized │ ├── vim-commentary │ ├── vim-dirvish │ ├── vim-fugitive │ ├── vim-indent-guides │ ├── vim-speeddating │ ├── vim-surround │ └── vmath.vim ├── spell ├── syntax └── usnippets
The last thing to do was to edit my .vimrc
and remove the lines related to pathogen.
diff --git a/shared/vimrc b/shared/vimrc
index b4a29d2..1fd75dc 100644
--- a/shared/vimrc
+++ b/shared/vimrc
@@ -3,11 +3,7 @@
"
" (On ms-windows use U:\_vimrc)
" Settings for vim, both on the console and under X11.
-" Last modified: 2018-12-08T10:46:30+0100
-
-" This _must_ be the first call: enable the pathogen plugin manager.
-execute pathogen#infect()
-call pathogen#helptags()
+" Last modified: 2019-07-19T22:33:06+0200
let mapleader = "\<Space>"
syntax on
For comments, please send me an e-mail.
Related articles
- Add TeX macro around (visual) selections in Vim
- Opening vim in a new terminal
- Switching to the vim editor