File tree 3 files changed +36
-0
lines changed
3 files changed +36
-0
lines changed Original file line number Diff line number Diff line change
1
+ " templates for new files
2
+
3
+ command ! -complete =file -nargs =1 Template call Template (" <args>" )
4
+
5
+ function ! Template (args )
6
+ execute " edit " .a: args
7
+ let filename = expand (" %:p:t" )
8
+ for path in pathogen#split (&runtimepath )
9
+ let tmpl = path ." /templates/" .filename
10
+ if filereadable (tmpl)
11
+ execute " read " .tmpl
12
+ execute " 1:del"
13
+ break
14
+ endif
15
+ let splitted = split (filename, " \. " )
16
+ if len (splitted)
17
+ let tmpl = path ." /templates/tmpl." .splitted[-1 ]
18
+ if filereadable (tmpl)
19
+ execute " read " .tmpl
20
+ execute " 1:del"
21
+ break
22
+ endif
23
+ endif
24
+ endfor
25
+ endfunction
Original file line number Diff line number Diff line change
1
+ [buildout]
2
+ newest = false
3
+ prefer-final = true
4
+ parts = eggs
5
+
6
+ [eggs]
7
+ recipe = z3c.recipe.scripts
8
+ eggs =
9
+
Original file line number Diff line number Diff line change
1
+ # -*- coding: utf-8 -*-
2
+
You can’t perform that action at this time.
0 commit comments