chore(awful: hotkeys: vim): add `find` and `scroll` categories
This commit is contained in:
parent
e5466feb07
commit
36e124d894
|
@ -13,8 +13,10 @@ local vim_rule_any = {name={"vim", "VIM"}}
|
||||||
for group_name, group_data in pairs({
|
for group_name, group_data in pairs({
|
||||||
vim_motion= { color="#009F00", rule_any=vim_rule_any },
|
vim_motion= { color="#009F00", rule_any=vim_rule_any },
|
||||||
vim_command= { color="#aFaF00", rule_any=vim_rule_any },
|
vim_command= { color="#aFaF00", rule_any=vim_rule_any },
|
||||||
vim_command_insert= { color="#cF4F40", rule_any=vim_rule_any },
|
vim_command_insert= { color="#cF4F40", rule_any=vim_rule_any },
|
||||||
vim_operator= { color="#aF6F00", rule_any=vim_rule_any },
|
vim_operator= { color="#aF6F00", rule_any=vim_rule_any },
|
||||||
|
vim_find= { color="#65cF9F", rule_any=vim_rule_any },
|
||||||
|
vim_scroll= { color="#659FdF", rule_any=vim_rule_any },
|
||||||
}) do
|
}) do
|
||||||
hotkeys_popup.group_rules[group_name] = group_data
|
hotkeys_popup.group_rules[group_name] = group_data
|
||||||
end
|
end
|
||||||
|
@ -30,45 +32,31 @@ local vim_keys = {
|
||||||
['-']="prev line",
|
['-']="prev line",
|
||||||
w="next word",
|
w="next word",
|
||||||
e="end word",
|
e="end word",
|
||||||
t=". 'till",
|
|
||||||
['[']=". misc",
|
['[']=". misc",
|
||||||
[']']=". misc",
|
[']']=". misc",
|
||||||
f=". find char",
|
|
||||||
[';']="repeat t/T/f/F",
|
|
||||||
["'"]=". goto mk. BOL",
|
["'"]=". goto mk. BOL",
|
||||||
b="prev word",
|
b="prev word",
|
||||||
n="next search match",
|
["|"]='BOL/goto col',
|
||||||
[',']="reverse t/T/f/F",
|
|
||||||
['/']=". find",
|
|
||||||
['~']="toggle case",
|
|
||||||
["#"]='prev indent',
|
|
||||||
["$"]='EOL',
|
["$"]='EOL',
|
||||||
["%"]='goto matching bracket',
|
["%"]='goto matching bracket',
|
||||||
["^"]='"soft" BOL',
|
["^"]='"soft" BOL',
|
||||||
["*"]='search word under cursor',
|
|
||||||
["("]='sentence begin',
|
["("]='sentence begin',
|
||||||
[")"]='sentence end',
|
[")"]='sentence end',
|
||||||
["_"]='"soft" BOL down',
|
["_"]='"soft" BOL down',
|
||||||
["+"]='next line',
|
["+"]='next line',
|
||||||
W='next WORD',
|
W='next WORD',
|
||||||
E='end WORD',
|
E='end WORD',
|
||||||
T=". \"back\" 'till",
|
|
||||||
['{']="paragraph begin",
|
['{']="paragraph begin",
|
||||||
['}']="paragraph end",
|
['}']="paragraph end",
|
||||||
F='. "back" find char',
|
|
||||||
G='EOF/goto line',
|
G='EOF/goto line',
|
||||||
H='move cursor to screen top',
|
H='move cursor to screen top',
|
||||||
M='move cursor to screen middle',
|
M='move cursor to screen middle',
|
||||||
L='move cursor to screen bottom',
|
L='move cursor to screen bottom',
|
||||||
B='prev WORD',
|
B='prev WORD',
|
||||||
N='prev search match',
|
|
||||||
['?']='. "back" find',
|
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
modifiers = {"Ctrl"},
|
modifiers = {"Ctrl"},
|
||||||
keys = {
|
keys = {
|
||||||
e="scroll line up",
|
|
||||||
y="scroll line down",
|
|
||||||
u="half page up",
|
u="half page up",
|
||||||
d="half page down",
|
d="half page down",
|
||||||
b="page up",
|
b="page up",
|
||||||
|
@ -93,15 +81,13 @@ local vim_keys = {
|
||||||
vim_command={{
|
vim_command={{
|
||||||
modifiers = {},
|
modifiers = {},
|
||||||
keys = {
|
keys = {
|
||||||
|
['~']="toggle case",
|
||||||
q=". record macro",
|
q=". record macro",
|
||||||
r=". replace char",
|
r=". replace char",
|
||||||
u="undo",
|
u="undo",
|
||||||
p="paste after",
|
p="paste after",
|
||||||
gg="go to the top of file",
|
gg="go to the top of file",
|
||||||
gf="open file under cursor",
|
gf="open file under cursor",
|
||||||
zt="scroll cursor to the top",
|
|
||||||
zz="scroll cursor to the center",
|
|
||||||
zb="scroll cursor to the bottom",
|
|
||||||
x="delete char",
|
x="delete char",
|
||||||
v="visual mode",
|
v="visual mode",
|
||||||
m=". set mark",
|
m=". set mark",
|
||||||
|
@ -117,7 +103,6 @@ local vim_keys = {
|
||||||
K='help',
|
K='help',
|
||||||
[':']='ex cmd line',
|
[':']='ex cmd line',
|
||||||
['"']='. register spec',
|
['"']='. register spec',
|
||||||
["|"]='BOL/goto col',
|
|
||||||
ZZ='quit and save',
|
ZZ='quit and save',
|
||||||
ZQ='quit discarding changes',
|
ZQ='quit discarding changes',
|
||||||
X='back-delete',
|
X='back-delete',
|
||||||
|
@ -153,6 +138,35 @@ local vim_keys = {
|
||||||
C='change to EOL',
|
C='change to EOL',
|
||||||
}
|
}
|
||||||
}},
|
}},
|
||||||
|
|
||||||
|
vim_find={{
|
||||||
|
modifiers = {},
|
||||||
|
keys = {
|
||||||
|
[';']="repeat t/T/f/F",
|
||||||
|
[',']="reverse t/T/f/F",
|
||||||
|
['/']=". find",
|
||||||
|
['?']='. reverse find',
|
||||||
|
n="next search match",
|
||||||
|
N='prev search match',
|
||||||
|
f=". find char",
|
||||||
|
F='. reverse find char',
|
||||||
|
t=". 'till char",
|
||||||
|
T=". reverse 'till char",
|
||||||
|
["*"]='find word under cursor',
|
||||||
|
["#"]='reverse find under cursor',
|
||||||
|
}
|
||||||
|
}},
|
||||||
|
|
||||||
|
vim_scroll={{
|
||||||
|
modifiers = {},
|
||||||
|
keys = {
|
||||||
|
e="scroll line up",
|
||||||
|
y="scroll line down",
|
||||||
|
zt="scroll cursor to the top",
|
||||||
|
zz="scroll cursor to the center",
|
||||||
|
zb="scroll cursor to the bottom",
|
||||||
|
}
|
||||||
|
}},
|
||||||
}
|
}
|
||||||
|
|
||||||
hotkeys_popup.add_hotkeys(vim_keys)
|
hotkeys_popup.add_hotkeys(vim_keys)
|
||||||
|
|
Loading…
Reference in New Issue