spacemacs icon indicating copy to clipboard operation
spacemacs copied to clipboard

Evil comments

Open practicalli-johnny opened this issue 6 years ago • 0 comments

The different approaches to creating comments https://practical.li/spacemacs/documentation/comments.html

g c g c c SPC ; SPC ; ;

commenting lines / sexps

Press SPC ; and then a motion to comment/uncomment a region.

Commenting current out 5 lines downwards: SPC ; 5 j Commenting out current line only: SPC ; ;

And the classic M-; which works everywhere and in all modes (where Spacemacs knows what the character(s) are for a comment - prompts you if it doesnt know the comment characters)

https://github.com/syl20bnr/spacemacs/tree/master/layers/%2Bvim/evil-commentary

LSP snippets for comments

comment-heading and comment-separator are defined in practicalli/clojure-lsp-config

  {:name "comment-heading"
   :detail "Comment Header"
   :snippet
   ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;; ${1:Namespace summary title}
    ;;
    ;; ${2:Brief description}\n;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n\n$0"}

  {:name "comment-separator"
   :detail "Comment Separator"
   :snippet
   ";; ${1:Namespace summary title}\n;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n\n$0"}

practicalli-johnny avatar Jul 19 '19 18:07 practicalli-johnny