diff options
| author | Mike Vink <mike@pionative.com> | 2024-06-09 12:14:20 +0200 |
|---|---|---|
| committer | Mike Vink <mike@pionative.com> | 2024-06-09 12:14:44 +0200 |
| commit | 5013daa0e8b7e2db35d30f3c73b552b4f96b58c4 (patch) | |
| tree | 6fc6d2a6b4090964619e29e6948aea0e8b457d5e /mut | |
| parent | a0d36ed6a666c14c0d92ce2732e23289771778f4 (diff) | |
fzf-tail
Diffstat (limited to 'mut')
| -rwxr-xr-x | mut/bin/lfub | 7 | ||||
| -rw-r--r-- | mut/neovim/fnl/conf/init.fnl | 11 |
2 files changed, 17 insertions, 1 deletions
diff --git a/mut/bin/lfub b/mut/bin/lfub index ffcb52a..50bae0d 100755 --- a/mut/bin/lfub +++ b/mut/bin/lfub @@ -18,6 +18,11 @@ else mkfifo "$FIFO_UEBERZUG" ueberzug layer -s <"$FIFO_UEBERZUG" -p json & exec 3>"$FIFO_UEBERZUG" - trap cleanup HUP INT QUIT TERM PWR EXIT + sys="$(uname)" + if ! [ "$sys" = "Darwin" ]; then + trap cleanup HUP INT QUIT TERM PWR EXIT + else + trap cleanup HUP INT QUIT TERM EXIT + fi lf "$@" 3>&- fi diff --git a/mut/neovim/fnl/conf/init.fnl b/mut/neovim/fnl/conf/init.fnl index c5a3f86..da78287 100644 --- a/mut/neovim/fnl/conf/init.fnl +++ b/mut/neovim/fnl/conf/init.fnl @@ -85,6 +85,17 @@ (map :n "[x" ":lprevious<cr>") (map :n "]x" ":lnext<cr>") (map :n :<leader>xp #(fzf.files)) + (map :n "<leader>:" #(do + (var keys "") + (if (not= (vim.opt_local.filetype:get) "oil") + (set keys (.. ":silent grep <c-r><c-w> " (vim.fn.bufname "%") "<c-f>B<left>i<space>")) + (do + (local f (vim.fn.bufname "%")) + (set keys (.. ":silent grep " (f:gsub "oil://" "") "<c-f>B<left>i<space>")))) + (vim.api.nvim_feedkeys + (vim.api.nvim_replace_termcodes + keys true false true) + :n false))) (map :n "<leader>;" #(do (var keys "") (if (not= (vim.opt_local.filetype:get) "oil") |
