aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--init.lua10
1 files changed, 8 insertions, 2 deletions
diff --git a/init.lua b/init.lua
index 489983d..815b4f8 100644
--- a/init.lua
+++ b/init.lua
@@ -10,6 +10,8 @@ require("lpeg")
local l = lpeg
local C, Cc, Ct, Cmt, Cp, Cg, P, R, S, V = l.C, l.Cc, l.Ct, l.Cmt, l.Cp, l.Cg, l.P, l.R, l.S, l.V
+local progname = ...
+
local M = {config = {}}
-- Inverted and unrolled config table.
@@ -100,6 +102,10 @@ local function case(str)
end)
end
+local function h(msg)
+ return string.format("|@%s| %s", progname, msg)
+end
+
local function operator_new(key, handler, object, motion, help, novisual)
local id = vis:operator_register(handler)
if id < 0 then
@@ -117,9 +123,9 @@ local function operator_new(key, handler, object, motion, help, novisual)
end
end
end
- vis:map(vis.modes.NORMAL, key, binding, help)
+ vis:map(vis.modes.NORMAL, key, binding, h(help))
if not novisual then
- vis:map(vis.modes.VISUAL, key, binding, help)
+ vis:map(vis.modes.VISUAL, key, binding, h(help))
end
end