spacemacs/layers/+vim/evil-commentary/README.org

33 lines
1.4 KiB
Org Mode

#+TITLE: Evil-commentary layer
#+HTML_HEAD_EXTRA: <link rel="stylesheet" type="text/css" href="../../../css/readtheorg.css" />
* Table of Contents :TOC_4_org:noexport:
- [[Description][Description]]
- [[Install][Install]]
- [[Key bindings][Key bindings]]
* 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]].
- 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
mode to comment out the selection.
For more details see the [[https://github.com/linktohack/evil-commentary][evil-commentary]] repository.
* Install
To use this configuration layer, add it to your =~/.spacemacs=. You will need to
add =evil-commentary= to the existing =dotspacemacs-configuration-layers= list in this
file.
* Key bindings
| Key Binding | Description |
|-------------+-------------------------------|
| ~SPC ;~ | comment operator |
| ~gcc~ | comment current line |
| ~gcap~ | comment paragraphs |
| ~gc SPC y~ | comment up to a line with avy |
| ~gy~ | comment and yank |