Copy doc comment (///) prefix to new lines

This commit is contained in:
lePerdu 2019-11-09 09:41:11 -05:00
parent 2167374496
commit 6aab2f54dd

View File

@ -80,8 +80,8 @@ define-command -hidden gluon-trim-indent %{
define-command -hidden gluon-indent-on-new-line %{ define-command -hidden gluon-indent-on-new-line %{
evaluate-commands -draft -itersel %{ evaluate-commands -draft -itersel %{
# copy // comments prefix and following white spaces # copy // and /// comments prefix and following white spaces
try %{ execute-keys -draft k <a-x> s ^\h*\K//\h* <ret> y gh j P } try %{ execute-keys -draft k <a-x> s ^\h*\K///?\h* <ret> y gh j P }
# preserve previous line indent # preserve previous line indent
try %{ execute-keys -draft \; K <a-&> } try %{ execute-keys -draft \; K <a-&> }
# filter previous line # filter previous line