Fix elixir copying comment # sign
Elixir uses # for comments, not --. Implementation is copied from Nim.
This commit is contained in:
parent
0f49e7375e
commit
8867e40929
|
@ -94,8 +94,8 @@ define-command -hidden elixir-trim-indent %{
|
|||
|
||||
define-command -hidden elixir-insert-on-new-line %[
|
||||
evaluate-commands -no-hooks -draft -itersel %[
|
||||
# copy -- comments prefix and following white spaces
|
||||
try %{ execute-keys -draft k <a-x> s ^\h*\K--\h* <ret> y gh j P }
|
||||
# copy '#' comment prefix and following white spaces
|
||||
try %{ exec -draft k <a-x> s ^\h*#\h* <ret> y jgh P }
|
||||
# wisely add end structure
|
||||
evaluate-commands -save-regs x %[
|
||||
try %{ execute-keys -draft k <a-x> s ^ \h + <ret> \" x y } catch %{ reg x '' }
|
||||
|
|
1
test/indent/elixir/insert-comment-hash/cmd
Normal file
1
test/indent/elixir/insert-comment-hash/cmd
Normal file
|
@ -0,0 +1 @@
|
|||
c<ret>
|
1
test/indent/elixir/insert-comment-hash/in
Normal file
1
test/indent/elixir/insert-comment-hash/in
Normal file
|
@ -0,0 +1 @@
|
|||
# Comment %( )comment2
|
2
test/indent/elixir/insert-comment-hash/out
Normal file
2
test/indent/elixir/insert-comment-hash/out
Normal file
|
@ -0,0 +1,2 @@
|
|||
# Comment
|
||||
# comment2
|
3
test/indent/elixir/insert-comment-hash/rc
Normal file
3
test/indent/elixir/insert-comment-hash/rc
Normal file
|
@ -0,0 +1,3 @@
|
|||
source "%val{runtime}/colors/default.kak"
|
||||
source "%val{runtime}/rc/filetype/elixir.kak"
|
||||
set buffer filetype elixir
|
Loading…
Reference in New Issue
Block a user