vis: :cc command -> ,c mapping
1 files changed, 3 insertions(+), 2 deletions(-) M vis/visrc.lua
M vis/visrc.lua => vis/visrc.lua +3 -2
@@ 70,8 70,9 @@ vis.events.subscribe(vis.events.WIN_OPEN, function(win) vis:command('set savemethod inplace') end) vis:command_register("cc", function(argv, force, win, selection, range) local text = win.file:content(range) vis:map(vis.modes.VISUAL, ",c", function(keys) local win = vis.win local text = win.file:content(win.selection.range) local escaped = string.gsub(text, "'", "'\"'\"'") local file = io.popen(string.format("wl-copy '%s'", escaped)) file:close()