From 5041df441112a4533c62091799d864e61dbda3de Mon Sep 17 00:00:00 2001 From: Jörg Thalheim Date: Thu, 22 Jun 2017 13:09:56 +0100 Subject: doc/languages-frameworks/vim: add custom vimrc & packages --- doc/languages-frameworks/vim.md | 41 +++++++++++++++++++++++++++++++++++++---- 1 file changed, 37 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/doc/languages-frameworks/vim.md b/doc/languages-frameworks/vim.md index 5442d706cb0b..1d6a4fe8da8d 100644 --- a/doc/languages-frameworks/vim.md +++ b/doc/languages-frameworks/vim.md @@ -8,15 +8,48 @@ date: 2016-06-25 You'll get a vim(-your-suffix) in PATH also loading the plugins you want. Loading can be deferred; see examples. -VAM (=vim-addon-manager) and Pathogen plugin managers are supported. -Vundle, NeoBundle could be your turn. +Vim packages, VAM (=vim-addon-manager) and Pathogen are supported to load +packages. -## dependencies by Vim plugins +## Custom configuration + +Adding custom .vimrc lines can be done using the following code: + +``` +vim_configurable.customize { + name = "vim-with-plugins"; + + vimrcConfig.customRC = '' + set hidden + ''; +} +``` + +## Vim packages + +To store you plugins in Vim packages the following example can be used: + +``` +vim_configurable.customize { + vimrcConfig.packages.myVimPackage = with pkgs.vimPlugins; { + # loaded on launch + start = [ youcompleteme fugitive ]; + # manually loadable by calling `:packadd $plugin-name` + opt = [ phpCompletion elm-vim ]; + # To automatically load a plugin when opening a filetype, add vimrc lines like: + # autocmd FileType php :packadd phpCompletion + } +}; +``` + +## VAM + +### dependencies by Vim plugins VAM introduced .json files supporting dependencies without versioning assuming that "using latest version" is ok most of the time. -## HOWTO +### Example First create a vim-scripts file having one plugin name per line. Example: -- cgit 1.4.1