commit 223b8ac20f986eac09f378358d3cbd8494623902
parent 15014fc4ac5f05f5b1f16faeb56110326a07f351
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date: Mon, 16 Sep 2019 10:29:00 +0200
Add par binding in visual mode
Diffstat:
1 file changed, 8 insertions(+), 0 deletions(-)
diff --git a/.config/vis/visrc.lua b/.config/vis/visrc.lua
@@ -73,6 +73,14 @@ vis.events.subscribe(vis.events.INIT, function()
vis:map(vis.modes.NORMAL, leader..'CS', ':e ~/.config/vis/plugins/snippets.lua<Enter>')
vis:map(vis.modes.NORMAL, leader..'d', ':< date<Enter>')
vis:map(vis.modes.NORMAL, leader..'e', ':fzf true<Enter>')
+ vis:map(vis.modes.VISUAL, leader..'f',
+ function()
+ if vis.count then
+ vis:command(string.format(':|par %d', vis.count))
+ else
+ vis:command(':|par')
+ end
+ end)
vis:map(vis.modes.NORMAL, leader..'ga', ':!git add "$vis_filepath"<Enter>')
vis:map(vis.modes.NORMAL, leader..'gc', ':!git commit -v -S<Enter>')
vis:map(vis.modes.NORMAL, leader..'gp', ':!git push<Enter>')