diff options
author | Matěj Cepl <mcepl@cepl.eu> | 2021-02-27 19:41:51 +0100 |
---|---|---|
committer | Matěj Cepl <mcepl@cepl.eu> | 2021-02-27 19:41:51 +0100 |
commit | c88ab421ae0e3b6bab1a3623e5a1a7baa4a29334 (patch) | |
tree | 13d9ecc3f56f6187a4156fe6e0f400f8a1b3f597 | |
parent | 82a800062d424d2eb47a565463a7ef37f63482ae (diff) | |
download | vis-par-c88ab421ae0e3b6bab1a3623e5a1a7baa4a29334.tar.gz |
Don't make things too complicated.
-rw-r--r-- | init.lua | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1,9 +1,9 @@ require('vis') -par_prg = nil +par_prg = "fmt -c -w 65" vis:operator_new("gq", function(file, range, pos) - local prg = (par_prg ~= nil) and par_prg or "fmt -c -w 65" - local status, out, err = vis:pipe(file, range, prg) + vis:info("par_prg = " .. par_prg) + local status, out, err = vis:pipe(file, range, par_prg) -- local status, out, err = vis:pipe(file, range, "par -w 65") if not status then vis:info(err) @@ -12,7 +12,7 @@ vis:operator_new("gq", function(file, range, pos) file:insert(range.start, out) end return range.start -- new cursor location -end, "Formating operator, filter range through fmt(1)") +end, "Formating operator, filter range through formatting filter") vis:option_register("autoformat", "bool", function(value, toogle) if not vis.win then return false end |