-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathvim_plugins.vch
More file actions
executable file
·79 lines (69 loc) · 3.38 KB
/
vim_plugins.vch
File metadata and controls
executable file
·79 lines (69 loc) · 3.38 KB
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
67
68
69
70
71
72
73
74
75
76
77
78
79
### non-standard key mappings for plug-ins (installed using neobundle in .vimrc), include vim.vch first.
# vim_plugins.vch
# plug-in actions
Vim show Taglist = {Esc}""{ctrl+g};
Vim Align = {Esc}":" Wait(200) "Align ";
Vim Align <key> = {Esc}":" Wait(200) "Align $1"{Left_7};
## omnicomplete
complete = {ctrl+x}{ctrl+o};
local complete = {ctrl+p};
Remove preview = {esc}{ctrl+w}{Up}":" Wait(200) "q{enter}";
# UNITE plug-in, mappings in .vimrc
#Vim Unite = {Esc}":" Wait(200) "Unite file_rec buffer"{enter};
Unite files = {Esc}"\f";
Unite files recursive = {Esc}"\t";
Unite recent = {Esc}"\m";
#Unite outline = {Esc}"\o";
Unite history = {Esc}"\y";
Unite buffer = {Esc}"\e";
Unite insert = {tab} {Down_3} {enter};
# TComment, note: could also be done with csupport
tee comment (range=Repeat(9, {Left}) | line={enter}) = {esc}":" Wait(200) "TComment" $1;
# independent single line commands
GotoLineMod2(line, mod) := {Esc}"mv" ":" Wait(200) "$line"{enter} Wait(200) "$mod";
GotoLine4Mod2(thousands, hundreds, tens, ones, mod) :=
GotoLineMod2(Eval($thousands*1000 + $hundreds*100 + $tens*10 + $ones), $mod);
<line_mod2> := (
tee Comment=":" Wait(200) "TComment{enter}" "'v"
);
line [<line_mod2>] <0to9> = GotoLineMod2($2,$1);
line [<line_mod2>] <0to9> <0to9> = GotoLine4Mod2(0, 0, $2, $3, $1);
line [<line_mod2>] <0to9> <0to9> <0to9> = GotoLine4Mod2(0, $2, $3, $4, $1);
line [<line_mod2>] <0to9> <0to9> <0to9> <0to9> = GotoLine4Mod($2, $3, $4, $5, $1);
# relative line range commands
<relative_range_commands2> := (
tee Comment="TComment"
);
<relative_range_commands2> (Next="+" | Back="-") Line = {Esc} Wait(200) "$2" Wait(200) ":$1";
<relative_range_commands2> 2..30 Lines = {Esc} Wait(200) ":.,+" Eval($2-1) "$1";
<relative_range_commands2> Back 2..30 Lines = {Esc} Wait(200) ":-$2,-1$1";
# csupport (hotkey sections: comment, statements, preprocessor, idioms,
# snippets, c++, run)
<comment_type> := (
frame=fr | function=fu | method=me | class=cl |
implementation=fdi | header=fdh | source section=cs |
header section=hs | keyword=kc | special=sc | date=d |
time=t | toggle type=x
);
<comment_type> comment = \c$1;
<statement_type> := (
do=d | for=fo | if=if | if else=ife | else=e | while=wh |
switch=s | case=c
);
<statement_type> statement = \s$1;
<idiom_type> := (
function=f | static=sf | main=m | for increment=0 | print=p |
file print=fp
);
<idiom_type> idiom = \i$1;
start (brace="{{enter}" | comment="/*") [(block={enter})] = {esc}{i}"$1$2";
<preprocessor_type> := (
include header=ih | include global=< | include local='"' | define=d
);
<preprocessor_type> preprocessor = \p$1;
# NeoBundle
Bundle command (Install | Clean | List) = {esc}":" Wait(200) "NeoBundle$1"{enter};
##### surplus for reference -credit neon?
#### Can be used instead of unimacro "brackets" if ^X characters become a problem
###<surround> := ( par = "()" | bar = "||" | quote = "" );
##Surround <surround> = $1{Left};