aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--init.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/init.lua b/init.lua
index e2599c7..e7b57ef 100644
--- a/init.lua
+++ b/init.lua
@@ -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