Compare commits

...

2 Commits

Author SHA1 Message Date
1070fd29b9 kakoune: project symbols: exclude files with very long average line length
for example single or two lines bundled js files
2026-05-25 22:00:44 +02:00
6b4927cb51 kakoune: file/project symbols: use spaces as delimiters 2026-05-25 21:44:15 +02:00

View File

@@ -124,17 +124,17 @@ define-command -override git-hide-diff %{
define-command -override ctags-file-symbols %{
prompt -menu -shell-script-candidates %{
ctags -uo - -x $kak_buffile | awk '{ print $1 ":" $2 ":" $3 }'
ctags -uo - -x "$kak_buffile" | awk '{ print $1, $2, $3 }'
} 'File symbols: ' %{
evaluate-commands %sh{ printf '%s\n' $kak_text | awk -F ':' '{ print "execute-keys", $3, "g", "/\\b" $1 "\\b<ret>" }' }
evaluate-commands %sh{ printf '%s\n' "$kak_text" | awk '{ print "execute-keys", $3, "g", "/\\b" $1 "\\b<ret>" }' }
}
}
define-command -override ctags-project-symbols %{
prompt -menu -shell-script-candidates %{
git ls-files | xargs ctags -uo - -x | awk '{ print $1 ":" $2 ":" $3 ":" $4 }'
git ls-files | xargs wc | awk '$1 > 0 && $3/$1 < 1024 { print $4 }' | xargs ctags -uo - -x | awk '{ print $1, $2, $3, $4 }'
} 'Project symbols: ' %{
evaluate-commands %sh{ printf '%s\n' $kak_text | awk -F ':' '{ print "edit --", $4, $3 "; execute-keys /\\b" $1 "\\b<ret>" }' }
evaluate-commands %sh{ printf '%s\n' "$kak_text" | awk '{ print "edit --", $4, $3 "; execute-keys /\\b" $1 "\\b<ret>" }' }
}
}