-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathlocations.kak
26 lines (24 loc) · 894 Bytes
/
locations.kak
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
## Grep
define-command -override boost-grep -docstring "grep and select matches with <a-s>
works best if grepcmd uses a regex flavor similar to Kakoune's
" -params .. %{
try %{
evaluate-commands %sh{ [ -z "$1" ] && echo fail }
set-register / "(?S)%arg{1}"
grep %arg{@}
} catch %{
execute-keys -save-regs '' *
grep -- %sh{ printf %s "$kak_main_reg_slash" }
}
boost-map-quickselect
}
try %{ complete-command boost-grep file }
define-command -override boost-map-quickselect %{ evaluate-commands -save-regs 'l' %{
evaluate-commands -try-client %opt{toolsclient} %sh{
printf %s "map buffer normal <tab> '"
printf %s '%S^<ret><a-h>/^.*?:\d+(?::\d+)?:<ret>'
printf %s '<a-semicolon>l<a-l>'
printf %s "s$(printf %s "$kak_main_reg_slash" | sed s/"'"/"''"/g"; s/</<lt>/g")<ret>"
printf %s "'"
}
}}