Code Snippets KakouneScript

Short texts KakouneScript 🧑‍💻 Code snippets KakouneScript ✍️ Reading lists KakouneScript 👀

filedir.kak

hook global WinSetOption filetype=filedir %{ map buffer normal ‘_: filedir %val{selection}’ map buffer normal ‘: filedir ..’ } define-command filedir -params 1 -docstring \ “filedir [path]: open file or directory” \ -shell-script-candidates %{ lr -UA } \ %{ evaluate-commands %sh{ if [ -d “$1” ]; then printf ‘change-directory %s\n’ “$1” printf ‘edit *filedir* -scratch\n’ printf […]