diff options
author | Georgi Kirilov <> | 2021-05-04 12:52:23 +0300 |
---|---|---|
committer | Matěj Cepl <mcepl@cepl.eu> | 2022-08-18 19:08:36 +0200 |
commit | 11d3d23d45e991c2a9414958a6c377d4506f5ea2 (patch) | |
tree | b2d376444ccfb4b7c8cf0ae7be9e39a83a61e13c | |
parent | 9c89b5aa0bfc7858393062c7551650b3d3b30d67 (diff) | |
download | vis-toggler-11d3d23d45e991c2a9414958a6c377d4506f5ea2.tar.gz |
tag help entries with |@plugin-name|
-rw-r--r-- | init.lua | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -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 |