We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9226072 commit d93b23bCopy full SHA for d93b23b
rc/filetype/go.kak
@@ -135,7 +135,15 @@ define-command -hidden go-indent-on-closing-curly-brace %[
135
define-command -hidden go-insert-comment-on-new-line %[
136
evaluate-commands -no-hooks -draft -itersel %[
137
# copy // comments prefix and following white spaces
138
- try %{ execute-keys -draft <semicolon><c-s>kx s ^\h*\K/{2,}\h* <ret> y<c-o>P<esc> }
+ try %{
139
+ execute-keys -draft <semicolon><c-s>kx s ^\h*\K/{2,}\h* <ret> y<c-o>P<esc>
140
+ # check for empty comments and delete them
141
142
+ execute-keys kx<a-K>^\h*//+\h*$<ret>
143
+ } catch %{
144
+ execute-keys Jx_d
145
+ }
146
147
]
148
149
0 commit comments