@kyanny's blog

My thoughts, my life. Views/opinions are my own.

M-x comment-line (C-x C-;)



  • 行頭に移動 C-a
  • マークをセット C-SPC
  • 行末に移動 C-e
  • リージョンをコメント M-;



comment-line is an interactive compiled Lisp function in `newcomment.el'.

It is bound to C-x C-;.

(comment-line N)

For more information check the manuals.

Comment or uncomment current line and leave point after it. With positive prefix, apply to N lines including current one. With negative prefix, apply to -N lines above. Also, further consecutive invocations of this command will inherit the negative argument.

If region is active, comment lines in active region instead. Unlike ‘comment-dwim’, this always comments whole lines.