mirror of
https://github.com/mawww/kakoune.git
synced 2026-11-04 14:06:36 +01:00
Page:
Ctags
Pages
Ambiguous Keys
Annotated examples of "Kakoune script"
Avoid the escape key
Bar
Bc
Building
Clang
Community
Ctags
Distinguish between focused and unfocused clients in Tmux
Documenting Plugins
Dynamic Window Title
EditorConfig
Eval Exec
Fuzzy finder
Git integration via Tig
Grep
HTML editing
Hacking
Header files
Highlighters
Home
IDE
Implementing user mode
Increment and Decrement
Indentation and Tabulation
Info boxes
Installing Plugins
Integrating Other CLI apps
JSON RPC
Jumplist
Kak daemon helper : 1 session per project
Languages
Line flags
Manipulating dates with Chronic
Migrating from Vim popular plugins
Migrating from Vim
Normal mode commands
OpenBSD
Plugin Managers
Qalculate
Ranger
Readline
Regex
Registers & Clipboard
Registers Clipboard
Reverse search
Running commands at startup
Rust
Selections combinations
Selections
Setting Plugin Options
Shell scripting
Status line
String syntax
TUI
The window scope
Tips for building from source
Undo tree
Wc
Windows tips
Wrapping
Writing Plugins
kak ‐p
macOS tips
zsh zle
No results
5
Ctags
GavinSmith0123 edited this page 2025-07-18 17:19:43 +01:00
Table of contents
Kakoune provides the ctags.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 from http://github.com/universal-ctags/ctags which will install the readtags command.
Search for tags file
Use the following hook to search for a tags 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.
Key mappings
This makes C-] look up the symbol under the cursor, similarly to vim:
map global normal <c-]> <a-i>w:ctags-search<ret>
Use C-o as usual to go back.
Wiki Home Page
Onboarding
Keys
- Normal mode commands
- Avoid the escape key
- Implementing user mode (Leader key)
- Kakoune explain
- Kakoune TV
Editing
User Interface
Integration with OS and other tools
- Languages
- IDE
- Bar
- Dynamic Window Title
- Kak daemon helper : 1 session per project
- Registers & Clipboard
- macOS tips
- Windows tips
- Fuzzy finders
- JSON-RPC UI
- bc
- Qalculate!
- wc
- Shell Scripting
- Manipulating dates with Chronic
- Integrating Other CLI apps
