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)
This commit is contained in:
9
kakoune/.config/kak/scripts/projectsymbols.awk
Normal file
9
kakoune/.config/kak/scripts/projectsymbols.awk
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
for (i = 3; i < NF; ++i) {
|
||||
if ($i ~ /^[0-9]+$/) {
|
||||
j = match($0, "[ ]+" $(i-1) "[ ]+" $i " ")
|
||||
print substr($0, 0, j - 1) "\u00a0" $(i-1) "\u00a0" $i "\u00a0" $(i+1)
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user