dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit a8226753cf434cd3fc42c33711876cc5f138262a
parent 4094e02589749e8c3d4535a4d8bcf3cd3ceeff41
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Wed, 17 Jul 2019 20:50:52 +0200

Use external tool fmt for wrapping lines

Diffstat:
M.config/vis/visrc.lua | 5+++++
1 file changed, 5 insertions(+), 0 deletions(-)

diff --git a/.config/vis/visrc.lua b/.config/vis/visrc.lua @@ -88,6 +88,11 @@ vis.events.subscribe(vis.events.INIT, function() vis:map(vis.modes.NORMAL, leader..'t', ':!ctags -R . >/dev/null 2>&1 &<Enter>') vis:map(vis.modes.NORMAL, leader..'T', ':e ~/doc/todo.md<Enter>') vis:map(vis.modes.NORMAL, leader..'w', ':w<Enter>') + vis:map(vis.modes.NORMAL, leader..'W', function() + vis:command(':w') + vis:command(':!fmt -w 80 $vis_filepath > /tmp/fmttmp && mv /tmp/fmttmp $vis_filepath') + vis:command(':e') + end) vis:map(vis.modes.NORMAL, leader..'x', ':wq<Enter>') vis:map(vis.modes.VISUAL, leader..'X', '') vis:map(vis.modes.VISUAL, leader..'y', ':> xclip<Enter>')