summary refs log tree commit diff
path: root/doc/languages-frameworks/vim.md
diff options
context:
space:
mode:
authorJörg Thalheim <joerg@thalheim.io>2017-06-22 13:09:56 +0100
committerJörg Thalheim <joerg@thalheim.io>2017-06-22 13:25:03 +0100
commit5041df441112a4533c62091799d864e61dbda3de (patch)
tree65a1725f03c7007b471c7f67c8792e3a5228e069 /doc/languages-frameworks/vim.md
parentbb9e23837a3c4334133efa9976cd822b2bf333e3 (diff)
downloadnixpkgs-5041df441112a4533c62091799d864e61dbda3de.tar
nixpkgs-5041df441112a4533c62091799d864e61dbda3de.tar.gz
nixpkgs-5041df441112a4533c62091799d864e61dbda3de.tar.bz2
nixpkgs-5041df441112a4533c62091799d864e61dbda3de.tar.lz
nixpkgs-5041df441112a4533c62091799d864e61dbda3de.tar.xz
nixpkgs-5041df441112a4533c62091799d864e61dbda3de.tar.zst
nixpkgs-5041df441112a4533c62091799d864e61dbda3de.zip
doc/languages-frameworks/vim: add custom vimrc & packages
Diffstat (limited to 'doc/languages-frameworks/vim.md')
-rw-r--r--doc/languages-frameworks/vim.md41
1 files changed, 37 insertions, 4 deletions
diff --git a/doc/languages-frameworks/vim.md b/doc/languages-frameworks/vim.md
index 5442d706cb0..1d6a4fe8da8 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: