dot

packages and services management
Log | Files | Refs | README

commit 0da8f39a5dfe21166d829f1ce9c44d3c9e67cca9
parent 8433c72fa06fc50c2b1e2014f518175dfd55c85b
Author: sshbio <jd@ssh.bio>
Date:   Tue, 16 Aug 2016 19:52:00 +0200

swiper.lua: Now it's working

Diffstat:
Mbin/peax | 1-
Mdoc/feeds/read | 1+
Mshell/.profile | 1-
Dvim/.vimrc.swp | 0
Mvis/.config/vis/swiper.lua | 36++++++++++++++++++------------------
Mvis/.config/vis/visrc.lua | 2+-
6 files changed, 20 insertions(+), 21 deletions(-)

diff --git a/bin/peax b/bin/peax @@ -33,7 +33,6 @@ END { sub(/^[0-9]* /, "", COLUMNS); while (1) { - # Filter stdin through input and store into candidates j = 1; diff --git a/doc/feeds/read b/doc/feeds/read @@ -29,3 +29,4 @@ http://omicsomics.blogspot.com/2016/03/who-wants-to-write-review-article.html http://omicsomics.blogspot.com/2016/06/writing-big.html + diff --git a/shell/.profile b/shell/.profile @@ -6,7 +6,6 @@ #/ ____/ \/ \____/ \/ \/ \/ \___\ - Variables & shell config #\/============================================================================= - export EMAIL='jd@ssh.bio' export LS_COLORS='so=35:tw=91:ow=93' export NCURSES_NO_UTF8_ACS=1 # Fix for dvtm + abduco in TTY diff --git a/vim/.vimrc.swp b/vim/.vimrc.swp Binary files differ. diff --git a/vis/.config/vis/swiper.lua b/vis/.config/vis/swiper.lua @@ -1,25 +1,25 @@ #!/usr/bin/env lua --- __ --- ____ __ /\ \/ ____ ___ _____ --- / __// /\/ / /\ / __ \ .'__ \ / ____\ --- __\ \ / / / / / // /_/ // ____// / --- \___/ \____/ \// ____/ \___\ \/ - Select a line with vis-menu ---=================\/=========================================================== +-- __ +-- ____ __ /\ \/ ____ ___ _____ +-- / __// /\/ / /\ / __ \ .'__ \ / ____\ +--__\ \ / / / / / // /_/ // ____// / +--\___/ \____/ \// ____/ \___\ \/ +--================\/============================================================ require 'vis' -vis.events.win_open = function (win) - printf('%s\n', table.concat(file.lines, '\n')) -end - function swiper () - print('test test test\n') - local p = io.popen( - 'expand ' - .. vis.win.file.name - .. ' | sed \'s/$/\r/\' | vis-menu -l 10', - 'r' - ) - p:read('*a') + local p = io.popen([[ +stty="$(stty -g)" +stty sane +expand "]] .. vis.win.file.name .. [[" | while read -r line +do + nl="$((nl + 1))" + printf '%6s %s \n' "$nl" "$line" +done | vis-menu -l 10 | sed -r 's/ *([0-9]*).*/\1/' +stty "$stty" + ]], 'r') + + vis:feedkeys(p:read('*a') .. 'gg<C-l>') p:close() end diff --git a/vis/.config/vis/visrc.lua b/vis/.config/vis/visrc.lua @@ -41,7 +41,7 @@ vis.events.win_open = function (win) vis:command('map! normal "]e" "<vis-operator-delete><vis-operator-delete><put-after>"') -- Plugins - vis:map(vis.MODE_NORMAL, leader .. 'c', swiper) + vis:map(vis.MODE_NORMAL, 'g/', swiper) end