catai upgrade
This commit is contained in:
@@ -36,3 +36,21 @@ desc = "Maximize or restore the preview pane"
|
||||
on = "C"
|
||||
run = "plugin ouch"
|
||||
desc = "Compress with ouch"
|
||||
|
||||
[[mgr.prepend_keymap]]
|
||||
on = [ "c", "a" ]
|
||||
run = 'shell --block -- catai -T %s | nvim -R -c "set bt=nofile ft=xml" -'
|
||||
desc = "catai: Dump selected files/folders into Neovim"
|
||||
|
||||
[[mgr.prepend_keymap]]
|
||||
on = [ "c", "x" ]
|
||||
run = """\
|
||||
shell --block -- zsh -c \"args=(); for p in \\\"\\$@\\\"; do args+=(-x \\\"\\$p\\\"); done; catai -T \
|
||||
\\\"\\${args[@]}\\\" | nvim -R -c \\\"set bt=nofile ft=xml\\\" -\" -- %s\
|
||||
"""
|
||||
desc = "catai: Dump current dir EXCEPT selected items"
|
||||
|
||||
[[mgr.prepend_keymap]]
|
||||
on = [ "c", "d" ]
|
||||
run = 'shell --block -- catai -T -d | nvim -R -c "set bt=nofile ft=xml" -'
|
||||
desc = "catai: Dump git dirty files into Neovim"
|
||||
|
||||
+9
-7
@@ -13,14 +13,16 @@ export SAVEHIST=200000
|
||||
alias ls='ls --color=auto -Ah'
|
||||
alias ..='cd ..'
|
||||
alias ...='cd ../..'
|
||||
catai () {
|
||||
rg -l --hidden --glob '!.git/*' --sort path '^' -- "$@" | while IFS= read -r f; do
|
||||
printf "\n── %s ──\n" "$f"
|
||||
echo '```'
|
||||
cat "$f"
|
||||
echo '```'
|
||||
done
|
||||
catai() {
|
||||
if [[ " $* " == *" -i "* || " $* " == *" -y "* ]]; then
|
||||
local cmd
|
||||
cmd="$(command catai --print-cmd "$@")" && [[ -n "$cmd" ]] && print -z "$cmd"
|
||||
else
|
||||
command catai "$@"
|
||||
fi
|
||||
}
|
||||
alias cataid='catai -d'
|
||||
alias cataiy='catai -y'
|
||||
alias sioyek="QT_QPA_PLATFORM=xcb sioyek"
|
||||
|
||||
# --- basic keybinds ---
|
||||
|
||||
Reference in New Issue
Block a user