mirror of
https://github.com/mawww/kakoune.git
synced 2024-12-28 06:08:05 +03:00
Do not add an extra space before/after the commenting characters, to let the user choose exactly what will be inserted in the selection
This commit is contained in:
parent
2a6f36732d
commit
c84f06300a
@ -30,10 +30,10 @@ def comment-selection -docstring "Comment/uncomment the current selection" %{
|
||||
exec -draft %{<a-K>\A${opening_escaped}.*${closing_escaped}\z<ret>}
|
||||
|
||||
## Comment the selection
|
||||
exec %{a ${closing}<esc>i${opening} <esc>$((${#opening} + 1))H}
|
||||
exec %{a${closing}<esc>i${opening}<esc>${#opening}H}
|
||||
} catch %{
|
||||
## Uncomment the commented selection
|
||||
exec -draft %{s(\A${opening_escaped} )|( ${closing_escaped}\z)<ret>d}
|
||||
exec -draft %{s(\A${opening_escaped})|(${closing_escaped}\z)<ret>d}
|
||||
}
|
||||
}"
|
||||
}
|
||||
@ -67,7 +67,7 @@ def comment-line -docstring "Comment/uncomment the current line" %{
|
||||
exec -draft %{<a-K>^${opening_escaped}<ret>}
|
||||
|
||||
## Comment the line
|
||||
exec %{i${opening} <esc>$((${#opening} + 1))H}
|
||||
exec %{i${opening}<esc>${#opening}H}
|
||||
} catch %{
|
||||
## Uncomment the line
|
||||
exec -draft %{s^${opening_escaped}\h*<ret>d}
|
||||
|
Loading…
Reference in New Issue
Block a user