This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
spacemacs/layers/+spacemacs/spacemacs-editing
2023-01-13 06:28:55 +00:00
..
local/spacemacs-whitespace-cleanup spacemacs-editing: refactor 2021-04-04 12:48:21 +02:00
funcs.el Don't set :foreground/background to nil to avoid font warnings in emacs29 (#15877) 2023-01-13 06:28:55 +00:00
packages.el * layers/+spacemacs/spacemacs-editing: use the string-edit-at-point-mode 2022-11-13 07:22:51 +01:00
README.org Undo-region: more ergonomic keybindings (#15631) 2022-07-15 19:26:28 +00:00

spacemacs-editing layer

Description

This layer adds packages to improve editing with Spacemacs.

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

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.

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