Skip to content

Commit 5041df4

Browse files
committedJun 22, 2017
doc/languages-frameworks/vim: add custom vimrc & packages
1 parent bb9e238 commit 5041df4

File tree

1 file changed

+37
-4
lines changed
  • doc/languages-frameworks

1 file changed

+37
-4
lines changed
 

‎doc/languages-frameworks/vim.md

+37-4
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,48 @@ date: 2016-06-25
88
You'll get a vim(-your-suffix) in PATH also loading the plugins you want.
99
Loading can be deferred; see examples.
1010

11-
VAM (=vim-addon-manager) and Pathogen plugin managers are supported.
12-
Vundle, NeoBundle could be your turn.
11+
Vim packages, VAM (=vim-addon-manager) and Pathogen are supported to load
12+
packages.
1313

14-
## dependencies by Vim plugins
14+
## Custom configuration
15+
16+
Adding custom .vimrc lines can be done using the following code:
17+
18+
```
19+
vim_configurable.customize {
20+
name = "vim-with-plugins";
21+
22+
vimrcConfig.customRC = ''
23+
set hidden
24+
'';
25+
}
26+
```
27+
28+
## Vim packages
29+
30+
To store you plugins in Vim packages the following example can be used:
31+
32+
```
33+
vim_configurable.customize {
34+
vimrcConfig.packages.myVimPackage = with pkgs.vimPlugins; {
35+
# loaded on launch
36+
start = [ youcompleteme fugitive ];
37+
# manually loadable by calling `:packadd $plugin-name`
38+
opt = [ phpCompletion elm-vim ];
39+
# To automatically load a plugin when opening a filetype, add vimrc lines like:
40+
# autocmd FileType php :packadd phpCompletion
41+
}
42+
};
43+
```
44+
45+
## VAM
46+
47+
### dependencies by Vim plugins
1548

1649
VAM introduced .json files supporting dependencies without versioning
1750
assuming that "using latest version" is ok most of the time.
1851

19-
## HOWTO
52+
### Example
2053

2154
First create a vim-scripts file having one plugin name per line. Example:
2255

0 commit comments

Comments
 (0)
Please sign in to comment.