- Notifications
You must be signed in to change notification settings - Fork750
GavinSmith0123 edited this pageJul 18, 2025 ·5 revisions
Kakoune provides thectags.kak
script, but this won't work with out of the box ctags from sourceforge.net. It relies on the readtags command that is available in universal-ctags, but not installed by default. The easiest way would be to use ctags fromhttp://github.com/universal-ctags/ctags which will install the readtags command.
Use the followinghook to search for atags
file in the current directory, then parent directories, until found or the home or root directory is reached.
hook global KakBegin .* %{ evaluate-commands %sh{ path="$PWD" while [ "$path" != "$HOME" ] && [ "$path" != "/" ]; do if [ -e "./tags" ]; then printf "%s\n" "set-option -add current ctagsfiles %{$path/tags}" break else cd .. path="$PWD" # Replace any instances of repeated '/' with a single '/' path=`echo "$path" | tr -s /` fi done }}
This is equivalent to vim's:set tags=./tags;
option.
This makesC-]
look up the symbol under the cursor, similarly to vim:
map global normal <c-]> <a-i>w:ctags-search<ret>
UseC-o
as usual to go back.
- Normal mode commands
- Avoid the escape key
- Implementing user mode (Leader key)
- Kakoune explain
- Kakoune TV