aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--init.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/init.lua b/init.lua
index a3cbbc9..8d5582b 100644
--- a/init.lua
+++ b/init.lua
@@ -1,7 +1,9 @@
require('vis')
+par_prg = nil
vis:operator_new("gq", function(file, range, pos)
- local status, out, err = vis:pipe(file, range, "fmt -c -w 65")
+ local prg = (par_prg ~= nil) and par_prg or "fmt -c -w 65"
+ local status, out, err = vis:pipe(file, range, prg)
-- local status, out, err = vis:pipe(file, range, "par -w 65")
if not status then
vis:info(err)