-
Notifications
You must be signed in to change notification settings - Fork 0
/
openInVim.sh
executable file
·66 lines (55 loc) · 1.36 KB
/
openInVim.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#!/bin/bash
vim -s <(echo '
:function SynC()
:syn keyword cOperator keyword this
:syn keyword cType keyword T
:syn keyword cType keyword obj_ctfb
:syn keyword cType keyword fwchar
:syn keyword cType keyword ctvc2
:endfunction
:function OpenCTab(name)
:execute "tabe ".fnameescape(a:name).".h"
:call SynC()
:set nornu
:set foldlevel=20
:execute "vs ".fnameescape(a:name).".c"
:call SynC()
:set rnu
:set foldlevel=0
:endfunction
:e mkfile
:tabe README
:tabe submod/cstl/tmpl/tmpl.h
:call SynC()
:tabe submod/cstl/tmpl/obj.h
:call SynC()
:tabe submod/pdjson/pdjson.h
:call OpenCTab("submod/cstl/tmpl/arr")
:tabe res/conf.json
:set foldmethod=indent
:call OpenCTab("tests/tests")
:call OpenCTab("main")
:call OpenCTab("conf")
:call OpenCTab("parse")
:call OpenCTab("state")
:call OpenCTab("ship")
:call OpenCTab("ship_TTU")
:call OpenCTab("smodule")
:call OpenCTab("smodule_TTU")
:call OpenCTab("cmenu")
:call OpenCTab("dialogTree")
:call OpenCTab("ui_term")
:call OpenCTab("encounter")
:call OpenCTab("map")
:call OpenCTab("mapCpoint")
:call OpenCTab("mapCpointTTU")
:call OpenCTab("player")
:call OpenCTab("playerTTU")
:call OpenCTab("vec2")
:call OpenCTab("genTypes")
:call OpenCTab("genTypesTTU")
:call OpenCTab("cvlarr")
:call OpenCTab("resources")
'|sed 's/\t//')
# sed in the last line removes tabs which caused problems to vim.
# tabs make this mess more visible