Add autowrap.kak providing auto word wrapping hook
This commit is contained in:
parent
6f337b254d
commit
71081f3823
9
rc/autowrap.kak
Normal file
9
rc/autowrap.kak
Normal file
|
@ -0,0 +1,9 @@
|
|||
decl int autowrap_column 80
|
||||
|
||||
def autowrap-enable %{
|
||||
hook -group autowrap window InsertChar [^\n] %{ try %{ exec -draft "<a-h><a-k>.{%opt{autowrap_column},}<ret><a-;>bi<ret><esc>xX<a-k>[^\n]+\n[^\n]<ret>kx;d" } }
|
||||
}
|
||||
|
||||
def autowrap-disable %{
|
||||
rmhooks window autowrap
|
||||
}
|
Loading…
Reference in New Issue
Block a user