Table of Contents

spacemacs-editing layer

Table of ContentsClose

1. Description

This layer adds packages to improve editing with Spacemacs.

1.1. Features:

  • Support for automatic indentation of code via aggressive-indent.
  • Support for jumping to chars using a decision tree via avy.
  • Improvements for evaluating sexps via eval-sexp-fu.
  • Selecting and editing of multiple text elements via expand-region.
  • Support for editing files in hex format via hexl.
  • Deletion of consecutive horizontal whitespace with a single key via hungry-delete.
  • Support for selecting, copying and opening links using avy via link-hint.
  • Adding of sample text via lorem-ipsum.
  • Transient state for moving text via move-text.
  • Support for folding of code via origami and evil-vimish-fold.
  • Support for password generation via password-generator.
  • Support for improving parenthesis handling via smartparens.
  • Automatic whitespace cleanup on save via spacemacs-whitespace-cleanup.
  • Support for converting definitions to certain styles via string-inflection.
  • Support for generating UUIDs via uuidgen.
  • Support for conversion between Emacs regexps and PCRE regexps.
  • Support for persistent scratch via persistent-scratch.
  • Support for unkillable scratch via unkillable-scratch.
  • Support for sorting (press s) via dired-quick-sort
  • Support for evil-easymotion if the editing style is vim or hybrid.
  • Support for cycling between multi line block styles via multi-line.
  • Support for editing strings inplace via string-edit
  • Presents undo history as a tree via undo-tree

2. Customization

2.1. 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.

(setq-default dotspacemacs-configuration-layers
              '((spacemacs-editing :variables
                                   vim-style-enable-undo-region t)))

Author: root

Created: 2024-11-15 Fri 04:05

Validate