README - snip - native snippet expansion for vim
HTML git clone git://kroovy.de/snip
DIR Log
DIR Files
DIR Refs
DIR README
---
README (648B)
---
1 DESCRIPTION
2 -----------
3
4 This is somewhat of a hack to mimic SnipMate/TextMate plugins.
5 Offers the ability to insert preconfigured text snippets
6 when typing a keyword in vim normal mode (not insert mode!).
7
8 For example you type:
9
10 ,for
11
12 ...and vim instantly expands it to:
13
14 for (int i=0; i < 10; i++) {
15 /* body */
16 }
17
18 For each snipped you wanna use you need a line in your
19 ~/.vimrc:
20
21 nnoremap ,for :read $HOME/.vim/snip/for<CR>
22
23 Note: As you can see I use the (pseudo) prefix: ','
24
25
26 INSTALL
27 -------
28
29 1) CLONE
30 git clone git://kroovy.de/snip ~/.vim/snip
31
32 2) ENABLE
33 echo 'nnoremap ,for :read $HOME/.vim/snip/for<CR>' >> ~/.vimrc