Files
dotfiles/kakoune/.config/kak/scripts/filesymbolscmd.awk
Łukasz Pankowski de7dbf7f67 kakoune: file and project symbols: support spaces in first token (example css)
uses non-breaking space as a separator and assumes that first numeric
token (starting from second one) is the line number (i.e., assumes that
the searched token does not contain space delimited number)
2026-05-27 09:58:13 +02:00

11 lines
291 B
Awk

BEGIN {
n = split(ENVIRON["kak_text"], a, "\u00a0")
line = a[3]
if (n == 3 && line ~ /^[0-9]+/) {
pat = a[1]
gsub(/'/, "''", pat)
gsub(/\\/, "\\\\", pat)
print "execute-keys " line " g vv x s '/\\b\\Q" pat "\\E\\b|\\Q" pat "<ret>' <a-)>,"
}
}