-
Notifications
You must be signed in to change notification settings - Fork 1
/
kak.txt
74 lines (59 loc) · 2.74 KB
/
kak.txt
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
Print the value of an option
:echo %opt{filetype}
Two ways of displaying the same thing
echo %sh{echo $kak_selections}
echo %val{selections}
status line
unnamed0@[.......] -> clientname@[session id]
"%val{bufname}[%opt{filetype}] %val{cursor_line}:%val{cursor_char_column}"
:e -scratch *scratch* (or any name)
creates a buffer that you can simply discard with :q without !
addhl group <name> <- container... => regex under will only match within that container
...for subgroups:
addhl -group <name> group <subname>
\
if name is /, it references the shared highlighters group (windows on the same filetypes)
addhl ref <name> (reference a shared highlighter in this window)
...and highlighters:
addhl -group <name>(/<subname>) highlighter
this is a group name => thus we can add subregions:
addhl -group <name>/<region_name>
/
addhl regions -default code <name> <region_name1> <opening1> <closing1> <recurse1> \
\ <region_name2> <opening2> <closing2> <recurse2>...
+-> <code>: default region/group name when none matched
ex: region_name { } { <- } closes only once all
the recurse { have been closed
Ex file:
#include <... / code
\
func / reg 1
\
print / code
\
bla / reg 2
\
// ...
:exec wwd
selection moving, as if I did wwd myself
:exec -draft wwd
selection will stay where it is, but the next word will be deleted
-itersel evaluates the commands for every selections individually, instead of
all together in the same context. The main reason for that is to avoid selections
getting merged when they overlap.
So, if you have 3 selections, instead of applying the keys/commands as if you
had 3 selections, it will apply the keys/commands 3 times, first time starting
with first selection only, second time with second selection only, ...
<tab>, <a-i> are key names unlike
\n, \t which are character names
* write the current buffer state in a temporary file
* pass this file to your linter and capture the output
* parse the linter output, and fill 2 options
- a line_flags option, used by a flag_lines
highlighters to display a gutter
- an option storing the line -> diagnostic mapping,
in whatever format you can easily parse afterwards
clang-diagnositcs-next/clang-show-error-infos parse
that second option to respectively jump to the next
line on which there is a diagnositcs, and display an
info box for the diagnostic on the current line