From 08c948f52b1ce07863e53f953836e4bc0efab6ba Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Tue, 22 May 2018 12:24:54 +0100 Subject: [PATCH] Insert spaces after line comment markers Every other text editor I've ever used does this, and this makes Kakoune consistent with how comments work in e.g. its own source code. --- rc/core/comment.kak | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rc/core/comment.kak b/rc/core/comment.kak index 5910f0e5..3e017ed0 100644 --- a/rc/core/comment.kak +++ b/rc/core/comment.kak @@ -21,13 +21,13 @@ hook global BufSetOption filetype=(c|cpp|go|java|javascript|objc|php|rust|sass|s } hook global BufSetOption filetype=(cabal|haskell|moon|idris) %{ - set-option buffer comment_line '-- ' + set-option buffer comment_line '--' set-option buffer comment_block_begin '{-' set-option buffer comment_block_end '-}' } hook global BufSetOption filetype=clojure %{ - set-option buffer comment_line '#_ ' + set-option buffer comment_line '#_' set-option buffer comment_block_begin '(comment ' set-option buffer comment_block_end ')' } @@ -157,7 +157,7 @@ define-command comment-line -docstring '(un)comment selected lines using line co execute-keys sd } catch %{ # Comment the line - set-register '"' "%opt{comment_line}" + set-register '"' "%opt{comment_line} " execute-keys P } }