spacemacs/layers/+spacemacs/spacemacs-evil
duianto 94585331ce Replace move-text with drag-stuff
Just like: https://github.com/emacsfodder/move-text

https://github.com/rejeep/drag-stuff.el
also drags one or more (region) lines up or down.

But it also allows for dragging left and right (across end of lines):
- a word: changing place with the next or previous word.
- a region: moving it one character at a time to the left or right.

Added a new key binding: `SPC x .`
that opens the:
```
Drag Stuff Transient State
[k/K] up    [h/H] left   [q] quit
[j/J] down  [l/L] right
```

The `move-text` package isn't removed, even though it isn't used anymore in
Spacemacs.

Because the `evil-unimpaired` elpa directory is generated from the local
Spacemacs `evil-unimpaired.el` file.
https://github.com/syl20bnr/spacemacs/blob/develop/layers/%2Bspacemacs/spacemacs-evil/local/evil-unimpaired/evil-unimpaired.el

Therefore the `evil-unimpaired` key bindings `[e` and `]e` still call the
`move-text` commands.

Until the `evil-unimpaired` elpa directory has been removed and regenerated by
restarting Spacemacs.

Then they will call the new `drag-stuff` commands.

I don't know if/when the `move-text` package can be removed in the future.
2021-03-14 00:29:46 +01:00
..
local/evil-unimpaired Replace move-text with drag-stuff 2021-03-14 00:29:46 +01:00
config.el [evil-collection] support for dired 2021-01-30 10:17:20 +01:00
funcs.el update copyright to 2020 2020-09-23 21:25:01 +02:00
packages.el [evil-cleverparens] `evil-cp-change' should move the point 2021-02-21 17:43:45 +01:00
README.org documentation formatting: Sun Jan 31 11:47:27 UTC 2021 2021-01-31 20:57:53 +02:00

spacemacs-evil layer

Description

This layer adds various adjustments to packages to create an evilified experience throughout the entirety of Spacemacs.

Features:

  • Add evil tutorial with evil-tutor
  • Add relative line number with linum-relative (only in Emacs 25.x and older)
  • Add escaping under fd by default with evil-escape
  • Add occurrences count in mode-line when searching a buffer
  • Add support for lisp structure manipulation with evil-lisp-state
  • Add safe structural editing of lisp dialects with evil-cleverparens
  • Add evil-exchange to swap text
  • Add easy live editing of multiple occurrences with evil-iedit-state
  • Add new vim text objects for indentation with evil-indent-plus
  • Add operations to align text with evil-lion
  • Easy management of comments with evil-nerd-commenter
  • Navigation between pairs with evil-matchit
  • Advanced navigation on brackets with evil-unimpaired
  • Easy increment and decrement of numbers with evil-number
  • Support for additional vim movements via evil-args
  • Support for surrounding the marked area with a given character via evil-surround
  • Evilification of various modes if the editing style is vim or hybrid
  • Improves the comment function to be able to also do the inverse operation
  • Persistent highlight of searched text with evil-search-highlight-persist
  • Display tildes in non-buffer area with vi-tilde-fringe
  • Add evil-collection

Install

The spacemacs-evil layer is included by default in the Spacemacs distribution.

Note about evil-collection

evil-collection is a collection of Evil bindings for the parts of Emacs that Evil does not cover properly by default, such as help-mode, M-x calendar, Eshell and more.

However, there is a large overlap of features provided by both Spacemacs and evil-collection. For the same feature, Spacemacs implementation is often better than evil-collection.

That's said, when evil-collection is used carefully we can reduce the amount of effort wasted on reinventing the wheel on Spacemacs side.

Spacemacs provides a layer variable spacemacs-evil-collection-allowed-list for users and layer hackers to enable evil-collection on their desired modes.

For users, if you want to enable evil-collection on eglot, then you will need to declare this layer with it variable explicitly:

  (spacemacs-evil :variables
                      spacemacs-evil-collection-allowed-list
                     '(eglot))

For Spacemacs hackers check out git layer to see how we apply evil-collection to magit.