Fix python comment copy logic in python.kak
And introduce the first unit test that sources bundled support scripts. Fixes #860main
parent
6bfc68d4f3
commit
5af29b0254
|
@ -60,8 +60,8 @@ def -hidden _python_indent_on_new_line %{
|
|||
# cleanup trailing whitespaces from previous line
|
||||
try %{ exec -draft k <a-x> s \h+$ <ret> d }
|
||||
# copy '#' comment prefix and following white spaces
|
||||
try %{ exec -draft k x s ^\h*\K#\h* <ret> y j p }
|
||||
# indent after :
|
||||
try %{ exec -draft k x s ^\h*#\h* <ret> y jgh P }
|
||||
# indent after line ending with :
|
||||
try %{ exec -draft <space> k x <a-k> :$ <ret> j <a-gt> }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
../../rc
|
|
@ -0,0 +1 @@
|
|||
<a-j>welc<ret><esc>
|
|
@ -0,0 +1,2 @@
|
|||
# comment
|
||||
if haha
|
|
@ -0,0 +1,2 @@
|
|||
# comment
|
||||
# if haha
|
|
@ -0,0 +1,4 @@
|
|||
source "%val{runtime}/colors/default.kak"
|
||||
source "%val{runtime}/rc/core/formatter.kak"
|
||||
source "%val{runtime}/rc/core/python.kak"
|
||||
set buffer filetype python
|
Loading…
Reference in New Issue