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.
Moved:
- ("ai" "irc") to both the `erc` and `rcirc` layers. They don't have to be
renamed until the layers are loaded.
- ("ay" "ipython notebook") to the `ipython-notebook` layer.
- ("p$" "projects/shell")
("'" "open shell")
("as" "shells")
to the `shell` layer.
- The commands with keybindings from spacemacs-bootstrap/packages.el to
spacemacs-defaults/keybindings.el.
Removed:
- ("gd" "diff") it seems to be an old group name, there's no `SPC g d` group at
the moment.
- ("Re" "elisp") and ("Rp" "pcre") because they have moved to:
("xr" "regular expressions")
("xre" "elisp")
("xrp" "pcre")
- ("xm" "move") seems to be an old move text group, the current keybindings are
`SPC x J` and `SPC x K` which opens the Move Text Transient State.
- ("b" "persp-buffers") because `SPC b` is also renamed as ("b" "buffers") which
is more general and not persp-mode specific.