spacemacs/layers/+spacemacs/spacemacs-editing/README.org

55 lines
3.5 KiB
Org Mode
Raw Permalink Normal View History

2017-04-25 15:42:58 +00:00
#+TITLE: spacemacs-editing layer
#+TAGS: layer|misc|spacemacs
2019-05-05 17:26:40 +00:00
2019-05-07 20:05:06 +00:00
* Table of Contents :TOC_5_gh:noexport:
2017-05-22 14:16:12 +00:00
- [[#description][Description]]
- [[#features][Features:]]
- [[#customization][Customization]]
- [[#undo-region][Undo Region]]
2017-04-25 15:42:58 +00:00
* Description
This layer adds packages to improve editing with Spacemacs.
** Features:
- Support for automatic indentation of code via [[https://github.com/Malabarba/aggressive-indent-mode][=aggressive-indent=]].
- Support for jumping to chars using a decision tree via [[https://github.com/abo-abo/avy][=avy=]].
- Improvements for evaluating sexps via [[https://github.com/hchbaw/eval-sexp-fu.el/tree/36d2fe3bcf602e15ca10a7f487da103515ef391a][=eval-sexp-fu=]].
- Selecting and editing of multiple text elements via [[https://github.com/magnars/expand-region.el][=expand-region=]].
- Support for editing files in hex format via [[https://github.com/emacs-mirror/emacs/blob/master/lisp/hexl.el][=hexl=]].
- Deletion of consecutive horizontal whitespace with a single key
via [[https://github.com/nflath/hungry-delete][=hungry-delete=]].
- Support for selecting, copying and opening links using [[https://github.com/abo-abo/avy][=avy=]] via [[https://github.com/noctuid/link-hint.el][=link-hint=]].
- Adding of sample text via [[https://github.com/jschaf/emacs-lorem-ipsum][=lorem-ipsum=]].
- Transient state for moving text via [[https://github.com/emacsfodder/move-text][=move-text=]].
- Support for folding of code via [[https://github.com/gregsexton/origami.el][=origami=]] and [[https://github.com/alexmurray/evil-vimish-fold][=evil-vimish-fold=]].
- Support for password generation via [[https://github.com/vandrlexay/emacs-password-genarator][=password-generator=]].
- Support for improving parenthesis handling via [[https://github.com/Fuco1/smartparens][=smartparens=]].
- Automatic whitespace cleanup on save via =spacemacs-whitespace-cleanup=.
- Support for converting definitions to certain styles via [[https://github.com/akicho8/string-inflection][=string-inflection=]].
- Support for generating UUIDs via [[https://github.com/kanru/uuidgen-el][=uuidgen=]].
- Support for conversion between Emacs regexps and PCRE regexps.
- Support for persistent scratch via [[https://github.com/Fanael/persistent-scratch][=persistent-scratch=]].
- Support for unkillable scratch via [[https://github.com/EricCrosson/unkillable-scratch][=unkillable-scratch=]].
- Support for sorting (press ~s~) via [[https://gitlab.com/xuhdev/dired-quick-sort][=dired-quick-sort=]]
- Support for [[https://github.com/PythonNut/evil-easymotion][=evil-easymotion=]] if the editing style is =vim= or =hybrid=.
- Support for cycling between multi line block styles via [[https://github.com/IvanMalison/multi-line/][=multi-line=]].
- Support for editing strings inplace via [[https://github.com/magnars/string-edit.el][=string-edit=]]
- Presents undo history as a tree via [[https://gitlab.com/tsc25/undo-tree/-/blob/master/undo-tree.el][=undo-tree=]]
* Customization
** Undo Region
In normal state, ~u~ is bound to =evil-undo= which undo changes in the buffer.
Emacs's builtin =undo= command in addition has the ability to undo changes in a
selected region. But by default in visual state, ~u~ is bound to =evil-downcase=
which downcases the selected text.
You can bound =undo= to ~u~ in visual state, by setting the variable
=vim-style-enable-undo-region= to =t= in your =~/.spacemacs=.
#+BEGIN_SRC emacs-lisp
(setq-default dotspacemacs-configuration-layers
'((spacemacs-editing :variables
vim-style-enable-undo-region t)))
#+END_SRC