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,7 +30,7 @@ def comment-selection -docstring "Comment/uncomment the current selection" %{
|
||||||
exec -draft %{<a-K>\A${opening_escaped}.*${closing_escaped}\z<ret>}
|
exec -draft %{<a-K>\A${opening_escaped}.*${closing_escaped}\z<ret>}
|
||||||
|
|
||||||
## Comment the selection
|
## Comment the selection
|
||||||
exec %{a ${closing}<esc>i${opening} <esc>$((${#opening} + 1))H}
|
exec %{a${closing}<esc>i${opening}<esc>${#opening}H}
|
||||||
} catch %{
|
} catch %{
|
||||||
## Uncomment the commented selection
|
## 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>}
|
exec -draft %{<a-K>^${opening_escaped}<ret>}
|
||||||
|
|
||||||
## Comment the line
|
## Comment the line
|
||||||
exec %{i${opening} <esc>$((${#opening} + 1))H}
|
exec %{i${opening}<esc>${#opening}H}
|
||||||
} catch %{
|
} catch %{
|
||||||
## Uncomment the line
|
## Uncomment the line
|
||||||
exec -draft %{s^${opening_escaped}\h*<ret>d}
|
exec -draft %{s^${opening_escaped}\h*<ret>d}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user