2015-06-10 16:44:30 +00:00
#+TITLE : Evil-commentary contribution layer for Spacemacs
2015-11-08 18:04:44 +00:00
#+HTML_HEAD_EXTRA : <link rel="stylesheet" type="text/css" href="../../../css/readtheorg.css" />
2015-06-10 16:44:30 +00:00
2015-10-30 11:20:58 +00:00
* Table of Contents :TOC_4_org:noexport:
- [[Description ][Description ]]
- [[Install ][Install ]]
- [[Key bindings ][Key bindings ]]
2015-06-10 16:44:30 +00:00
* Description
This layer replaces [[https://github.com/redguardtoo/evil-nerd-commenter ][evil-nerd-commenter ]] with [[https://github.com/linktohack/evil-commentary ][evil-commentary ]] for those
who prefer the behaviour of [[https://github.com/tpope/vim-commentary ][vim-commentary ]].
2015-06-10 21:16:01 +00:00
- Use ~gcc~ to comment out a line (takes a count),
- ~gc~ to comment out the target of a motion (for example,
- ~gcap~ to comment out a paragraph), ~gc~ in visual
2015-07-30 23:28:58 +00:00
mode to comment out the selection.
2015-06-10 16:44:30 +00:00
For more details see the [[https://github.com/linktohack/evil-commentary ][evil-commentary ]] repository.
* Install
To use this contribution add it to your =~/.spacemacs= .
#+BEGIN_SRC emacs-lisp
(setq-default dotspacemacs-configuration-layers '(evil-commentary))
#+END_SRC
2015-09-07 04:25:30 +00:00
* Key bindings
| Key Binding | Description |
|-------------+-------------------------------|
| ~SPC ;~ | comment operator |
| ~gcc~ | comment current line |
| ~gcap~ | comment paragraphs |
2015-11-05 23:49:25 +00:00
| ~gc SPC y~ | comment up to a line with avy |
2015-09-07 04:25:30 +00:00
| ~gy~ | comment and yank |