refactor(hotkeys: vim): don't add each group rule manually

This commit is contained in:
actionless 2019-12-19 11:42:27 +01:00
parent db9334605a
commit 75e5b8b39b
1 changed files with 5 additions and 14 deletions

View File

@ -8,20 +8,6 @@
local hotkeys_popup = require("awful.hotkeys_popup.widget")
local vim_rule_any = {name={"vim", "VIM"}}
for group_name, group_data in pairs({
["VIM: motion"] = { rule_any=vim_rule_any },
["VIM: command"] = { rule_any=vim_rule_any },
["VIM: command (insert)"] = { rule_any=vim_rule_any },
["VIM: operator"] = { rule_any=vim_rule_any },
["VIM: find"] = { rule_any=vim_rule_any },
["VIM: scroll"] = { rule_any=vim_rule_any },
["VIM: fold"] = { rule_any=vim_rule_any },
}) do
hotkeys_popup.add_group_rules(group_name, group_data)
end
local vim_keys = {
["VIM: motion"] = {{
@ -191,4 +177,9 @@ local vim_keys = {
hotkeys_popup.add_hotkeys(vim_keys)
local vim_rule_any = {name={"vim", "VIM"}}
for group_name, _ in pairs(vim_keys) do
hotkeys_popup.add_group_rules(group_name, { rule_any=vim_rule_any })
end
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80