problem:
the attempt to hide the dired buffer, which-key entry:
r -> evil-mc
caused a void dired-mode-map message to appear on startup,
in the spacemacs-base distribution.
solution:
hide the which-key entry after dired loads.
problem:
pressing g shows the which-key entry:
r -> evil-mc
but it calls the expected commands:
revert-buffer (in dired)
magit-refresh
s -> evil-easymotion
but it calls the expected command:
magit-jump-to-staged
solution:
removing the gr and gs which-key entries,
shows the expected commands.
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.
Moved the function definitions for:
spacemacs//trailing-whitespace
spacemacs//set-whitespace-style-for-diff
from: spacemacs-default/packages.el
to: spacemacs-default/funcs.el
problem:
key bindings that use the winum package,
don't work in the spacemacs-base distribution.
for example in the buffer transient state: SPC b .
{number}, C-{number} or M-{number}
shows messages like these:
Wrong type argument: commandp, winum-select-window-1
Symbol’s function definition is void: winum-get-window-by-number
cause:
the winum package is loaded in the spacemacs-navigation layer,
but the layer isn't used in the spacemacs-base distribution.
solution:
show the message:
This command requires the winum package,
winum is part of the spacemacs-navigation layer.
problem:
Reloading the configuration: SPC f e R
after changing the variable: dotspacemacs-fullscreen-at-startup
to: t
changes Emacs into fullscreen mode.
solution:
Only check the variable and change to fullscreen mode on startup,
before Spacemacs has been initialized.
Fixes: Reloading config with fullscreen-at-startup t (in macOS) toggles fullscreen mode #13073
Spacemacs lacks a keybinding alternative to the most natural way of scrolling
Info pages (i.e. SPC) in vanilla emacs.
Anyway, this commit adds J/K to scroll most naturally through info pages.
Currently, in Info-mode, a keybinding for J is not defined while K is bound to
evil-lookup.
Issue #2828 already adresses the inconsistent experience, and in my opinion this
can and should be improved as navigating Info pages is a very crucial part of
using Emacs.
Personally I have bound J/K to scroll page up/down in buffers/pdf/djvu/doc-view,
which I inherited from using the zathura pdf reader, and I think this is a better
default than the default vim alternatives.
The newly added bindings had side effects for
magit. This was caused by which-keys replacement
working on bindings which are identical between
various modes.
To fix this I have changed the api to use the newly
added keymap based replacements which avoid these
issues.
As a side effect they are a ton faster as which
key does not have to compare all available bindings
everytime it opens its help window.
I have also fixed some more missing which-key
description in magit status buffer.
This layer helps quickly sorting Dired buffers in various ways, such as
time, size, etc.
I think the underlying package is useful and worth a place in spacemacs.
It has also been promoted by Pragmatic Emacs before (albeit long time
ago): http://pragmaticemacs.com/emacs/speedy-sorting-in-dired-with-dired-quick-sort/
Disclaimer: I'm the author of dired-quick-sort package
This avoids more problems found by @duianto.
Also:
* Use more descriptive variable names
* Print message explaining lack of narrowing in visual block mode
* Apply @duianto's fix to only activate visual selection it if it was active
previous to the creation of the indirect buffer
* Block use of visual block mode because of continuing problems in that mode,
and its questionable usefulness in this case
* Extract commonalities out of the narrowing functions
* Make the new keybindings into a list in the changelog for readability, per
@duianto
"SPC d" was used for documentation related keybindings, such as in `dash`
layer.
But it's now used for `dap` layer exclusively.
Removing this won't cause any issue as `dap` layer would correctly set
the keybindings once it's loaded.
This enables navigating up in the `ivy-reverse-i-search` list with `C-k`.
The same rebinding from `C-k` to `C-M-k` to kill a list entry,
is also done in the `ivy-switch-buffer`.
* Group `line-number` funcs under SPC t n
* Better name: absolute-line-numbers
Keep the old symbols around for backwards compatibility
Co-authored-by: Rostislav Svoboda <Rostislav.Svoboda@gmail.com>
problem:
The following error messages are shown.
When trying to move, select or swap the current buffer,
to a window nr greater than the total number of open windows.
For example:
With only one window open.
`SPC b 2`
>ad-Advice-select-window: Wrong type argument: window-live-p, nil
In the Buffer Transient State (`SPC b .`):
- `C-2` (`spacemacs/buffer-transient-state/winum-select-window-2`)
>Wrong type argument: window-valid-p, #<window 12>
- `2` (`spacemacs/buffer-transient-state/move-buffer-window-no-follow-2`)
>Wrong type argument: window-live-p, #<window 14>
- `M-2` (`spacemacs/buffer-transient-state/swap-buffer-window-no-follow-2`)
>Wrong type argument: stringp, nil
Solution:
Show a descriptive message, if the target window nr is greater than the number
of open windows. And ignore the LV buffer (hydra).
* [core] Fix evil keybindings when a link is selected in Custom-mode
This uses a separate keymap bound directly to the widget and circumvents the
existing evil keybindings.
This fixes the bug found by @duianto, which he posted
[here](https://github.com/syl20bnr/spacemacs/pull/13949#issuecomment-694685304).
* [core] Fix q and u to work everywhere in a Custom-mode buffer