Skip to content

Instantly share code, notes, and snippets.

@Screwtapello
Created December 29, 2018 20:50
Show Gist options
  • Save Screwtapello/b6b90b522afee8e76ad49337ca61b3a8 to your computer and use it in GitHub Desktop.
Save Screwtapello/b6b90b522afee8e76ad49337ca61b3a8 to your computer and use it in GitHub Desktop.
Mappings for kak-tree
declare-user-mode tree
map -docstring "prev" global tree <left> ": tree-select-prev-node<ret>"
map -docstring "parent" global tree <up> ": tree-select-node<ret>"
map -docstring "next" global tree <right> ": tree-select-next-node<ret>"
map -docstring "children" global tree <down> ": tree-select-children<ret>"
hook global WinSetOption filetype=.* %{
evaluate-commands %sh{
if command -V kak-tree >/dev/null 2>/dev/null &&
kak-tree --do-you-understand "$kak_opt_filetype"; then
echo "map -docstring 'tree-nav' window user t ': enter-user-mode -lock tree<ret>'"
else
echo "unmap window user t"
fi
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment