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 cf12c428d912aae066b349e7c6d158ac937e5df2
parent a7a6d1475ff527516a423116e5256a8b5559e3d8
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Sat, 15 Jun 2019 10:45:27 +0200

Remove rtv, add preliminary ripgrep binds for vis

Diffstat:
M.config/newsboat/config | 1-
M.config/vis/visrc.lua | 14++++++++++++++
2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/.config/newsboat/config b/.config/newsboat/config @@ -63,7 +63,6 @@ macro t set browser "tsp youtube-dl -o '~/tmp/%(title)s.%(ext)s' --add-metadata macro a set browser "tsp youtube-dl -o '~/tmp/%(title)s.%(ext)s' --add-metadata -xic -f bestaudio/best"; open-in-browser ; toggle-article-read ; set browser xdg-open macro v set browser "setsid nohup mpv >/dev/null 2>&1 "; open-in-browser ; toggle-article-read ; set browser xdg-open macro w set browser "w3m"; open-in-browser ; toggle-article-read ; set browser xdg-open -macro r set browser "rtv"; open-in-browser ; toggle-article-read ; set browser xdg-open # macro p set browser "dmenuhandler"; open-in-browser ; set browser xdg-open macro y set browser "echo -n %u | xclip -selection clipboard" ; open-in-browser ; set browser xdg-open macro p set browser "wkhtmltopdf %u out.pdf && mv out.pdf ~/tmp/$(basename $(mktemp)).pdf" ; open-in-browser ; set browser xdg-open diff --git a/.config/vis/visrc.lua b/.config/vis/visrc.lua @@ -19,6 +19,18 @@ vis:command_register("fzf", function(argv, force, cur_win, selection, range) end end, 'fuzzy file search') +vis:command_register("rg", function(argv, force, cur_win, selection, range) + local out = io.popen("irg"):read() + if out then + if argv[1] then + vis:command(string.format('e "%s"', out)) + else + vis:command(string.format('open "%s"', out)) + end + vis:feedkeys("<vis-redraw>") + end +end, 'fuzzy file-content search') + interpreters = { ["python"] = "!python -i $vis_filename", ["lua"] = "!lua -i $vis_filename", @@ -55,6 +67,8 @@ vis.events.subscribe(vis.events.INIT, function() vis:map(vis.modes.NORMAL, leader..'<Tab>', ':prev<Enter>') vis:map(vis.modes.NORMAL, leader..'e', ':fzf<Enter>') vis:map(vis.modes.NORMAL, leader..'o', ':fzf true<Enter>') + vis:map(vis.modes.NORMAL, leader..'g', ':rg<Enter>') + vis:map(vis.modes.NORMAL, leader..'G', ':rg true<Enter>') vis:map(vis.modes.NORMAL, leader..'<Tab>', ':fzfmru<Enter>') vis:map(vis.modes.NORMAL, leader..'r', ':< scholarref ') vis:map(vis.modes.NORMAL, leader..'p', ':< xclip -o<Enter>')