In evilified visual state.
- Add the inner: `i` and outer `a` text objects.
- Add `o` to exchange the point and mark
(jump between the start and end of the region)
evilified normal state is missing some useful keys:
y (evil-yank) and the common navigation keys:
f, F, t, T, w, W, b, B, $, ^
They are available in evilified visual state,
but it's useful to be able to copy text
without having to enter visual state first.
Adding `y` (`evil-yank`), makes the inner (`i`) and outer (`a`),
text objects available in evilified normal state.
This also adds the text objects to evilified visual state.
Just like: https://github.com/emacsfodder/move-texthttps://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.
Enable `evil-surround-mode` when exiting evilified state.
If `evil-surround-mode` was enabled.
Currently it only disables `evil-surround-mode`.
This was discovered while exiting `edebug-mode`.
This also removes the unused variable:
`evilified-state--evil-surround`
It might have been intended for this purpose.
Otherwise it can be added back when
a use case for it is introduced.
problem:
The toggle editing style prefix: SPC t E
always shows the same names:
e -> emacs (holy-mode)
h -> hybrid (hybrid-mode)
This causes some confusion about how to
switch to the vim (evil-mode) editing style,
from emacs or hybrid state.
solution:
Show which editing styles one will switch to:
In evil-mode:
e -> emacs (holy-mode)
h -> hybrid (hybrid-mode)
In holy-mode:
e -> vim (evil-mode)
h -> hybrid (hybrid-mode)
In hybrid-mode:
e -> emacs (holy-mode)
h -> vim (evil-mode)
problem:
Exiting edebug-mode, leaves the evil-visual-state-map
with only the two key bindings that are defined in:
evilified-state--setup-visual-state-keymap
y evil-yank
escape evil-exit-visual-state
solution:
Restore the evil-visual-state-map when exiting edebug-mode.
Added an alias for the new exit function:
evilified-state--evilified-state-on-exit
called: evil-evilified-state-exit
the opposite of: evil-evilified-state
problem:
updating Spacemacs without updating the evil package,
breaks Spacemacs on startup:
Symbol's function definition is void: evil-set-undo-system
solution:
make sure that evil-set-undo-system is bound.
It is impossible to ignore `evil-collection` anymore. `evil-magit` has been
deprecated recently and moved to `evil-collection`.
It will save time and effort for both Spacemacs and Evil to share and contribute
to `evil-collection` imo.
However I strongly prefer Spacemacs binding scheme over evil-collection's one.
We should only pick what we need from `evil-collection`.
This PR add mechanism to embrace `evil-collection` and apply it to shell layer (`vterm`)
and git layer.
Sometimes it is handy to show keymaps persistently with which-key. For example,
to show navigation commands in Info-mode, gnus, eww etc. This PR implements
handy toggles and documentation for that.
problem:
Pressing: u
in the spacemacs-base distribution, shows:
evil-undo: Symbol’s function definition is void: undo-tree-undo
cause:
The evil undo system is setup as: undo-tree
but undo-tree is loaded in the spacemacs-editing layer,
and the layer isn't used by default in the spacemacs-base distribution.
solution:
Set the evil undo system to undo-tree when the undo-tree package is used.
Now if undo-tree isn't setup, then:
- u uses the default Emacs undo command.
- C-r says: Customize ‘evil-undo-system’ for redo functionality.
* [core] add z$ as Evil keybinding for set-selective-display
This is a feature whose equivalent I had looked for previously and not found. I
bumped into it in [this excellent
article](https://karthinks.com/software/batteries-included-with-emacs/) which is
a survey of "batteries included" parts of Emacs. He mentions Spacemacs (in a
positive light) in the article, but the article is a lot about what you can do
_without_ distributions like Spacemacs, Doom, or Prelude. As such, this seems
like an opportunity to make Spacemacs even better---i.e. by making these
relatively unknown batteries that are already present in Emacs more discoverable
in Spacemacs.
I put it in the folding menu `z` because that fits its usecase. I used `$`
because:
* the out-of-the-box Emacs keybindings is `C-x $`.
* the menu is already fairly saturated
* I didn't know what else to base the mnemonic on because
* I'm not aware of a Vim equivalent
* The name of the Emacs function itself is nondescriptive of its behavior
I couldn't find any keybinding documentation table to add it to. Please let me
know if I missed something.
* [core] DWIM in z$ as suggested by @lebensterben
The PR fixes an issue where spacemacs is in a bad state after upgrading. I
suppose what happens is that `evil-set-undo-system` is invoked before `evil` is necessarily the correct version.
The evil state foreground color on the mode-line was set to
the mode-line background color.
This caused problems with some themes.
[FEATURE REQUEST] Darker option for mode-line color codes #13731
Solution:
Set the evil state foreground color to the darker of the
mode-line face foreground or background colors.
Follow up the changes in the previous commit with some minor improvements
to formatting, grammar, spelling, and wording.
* layers/+distributions/spacemacs-docker/README.org: Replace "+" with
"and".
* layers/+email/mu4e/README.org: Use full sentences in the comments in the
mu4e-alert example.
* layers/+intl/japanese/README.org: Use verbatim markers for names of
files, functions, packages, and variables. Capitalize "Linux".
* layers/+os/osx/README.org: Capitalize "Emacs", "Vim", and "Evil".
* layers/+os/osx/config.el (osx-command-as, osx-use-dictionary-app):
* layers/+os/osx/keybindings.el (spacemacs/system-is-mac): Improve
docstrings.
* layers/+readers/dash/README.org: Capitalize "API", "Helm", and "Ivy".
* layers/+spacemacs/spacemacs-defaults/config.el
(delete-by-moving-to-trash): Use full sentences in comment.
* layers/+spacemacs/spacemacs-defaults/funcs.el
(spacemacs/toggle-frame-fullscreen-non-native): Improve docstrings.
There was a edge case with the declaration of the `lsp` layer in `layers.el`
files.
The `hy` layer depends on the `python` layer which in turn depends on the `lsp`
layer if and only if the `python-backend` layer variable is set to `lsp`.
When the `hy` layer was declared first then it declares the `python` layer
without its layer variables, thus the `lsp` layer was not declared because the
`python-backend` variable was not set.
The fix is to gather all the layer dependencies and resolve them only after all
the used layers have been declared.
* new function `configuration-layer/declare-layer-dependencies`
* replace all calls to `configuration-layer/declare-layer` by the new function
except for distribution layers (we declare layer dependencies right away in
distribution layers)
Thanks sdwolfz for the suggestion to add underscore to the transient states,
then the shift key doesn't have to be released if it was held down to press `+`.
Added key bindings:
Evil numbers:
`SPC n _` decrease number under point
in the transient state:
`j` decrease number under point
`k` increase number under point
`SPC T T _` decrease transparency
`SPC z x _` scale down font
`SPC z f _` zoom out frame
Update documentation:
Zoom frame:
`q` quit transient state
Evil numbers:
`SPC n =` increase number under point
`SPC n _` decrease number under point
`0..9` add a number prefix argument
`q` quit transient state
Fixed a typo and made a small rewrite of the tip about using a prefix argument.
Added keys to transient states:
Font scaling:
Added `_` scale down
Reordered `k` assignment to match the order in the transient state
Frame transparency:
Added `_` decrease
Reordered `k` assignment to match the order in the transient state
Evil numbers:
Added `k` increase
Added `_` and `j` decrease
Zoom frame:
Added `_` zoom frame out
Reordered `k` assignment to match the order in the transient state
Which-key entries for Evil numbers `SPC n`:
Group together keys that call the same command:
From: + and =
To: +,=
From: - and _
To: -,_
Added new key bindings:
- In the Buffer column:
Added "g" and "G":
[</g] beg
[>/G] end
- In a new Other column:
[q] quit
Reordered the columns:
From: Large to small: buffer, full page, half page, line/column
To: Small to large: line/column, half page, full page, buffer
Reason: The most used (first listed) bindings are probably not scroll to the
"beginning" or "end" of the buffer.
Rearranged the half page columns two instances of "down/up" to one "down" and
one "up".
Reduced the TS width:
- Separated the line/column and full page keys to one "down" and one "up", and
the buffer keys to one "beginning" and one "end".
- Renamed "beginning" to "beg".
Reordered the key bindings (TS) logically: "up" above "down".
Reordered the key bindings (code):
Arranged them in the same order as the columns in the TS.