Commit graph

727 commits

Author SHA1 Message Date
duianto 480efa0f3d Remove unused package: move-text 2021-03-14 09:45:13 +01:00
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
duianto d424c8d1d1 Bind frame keys using spacemacs|spacebind
This names the SPC F which-key entry.
before: +prefix
after: Frames

And adds "..." to the end of the descriptions,
for the keys that require additional user interactions.
2021-03-13 23:02:40 +01:00
duianto b24fccdbff Update call to purpose-x-magit-multi-on
The upstream fix:
Fix #178: x-magit: don't override backup variable on double activation by bmag https://github.com/bmag/emacs-purpose/pull/179

Made it possible to just call: purpose-x-magit-multi-on
2021-03-04 20:37:11 +01:00
duianto 91f92d82fe Fix purpose and magit: max-lisp-eval-depth
problem:
trying to open a magit buffer after
reloading the configuration: `SPC f e R`

shows the message:
>Lisp nesting exceeds ‘max-lisp-eval-depth’

cause:
purpose-x-magit-multi-on can't be called twice,
without turning it off first: purpose-x-magit-off

Spacemacs, purpose-x-magit-multi-on, Lisp nesting exceeds ‘max-lisp-eval-depth’
https://github.com/bmag/emacs-purpose/issues/178

solution:
in this case we'll only call: purpose-x-magit-multi-on
once per Emacs session.

notes:
this also removes the call to: with-eval-after-load 'magit
because it's handled upstream:
c85dd3c9f7/window-purpose-x.el (L243)
2021-03-04 11:38:48 +01:00
duianto 6d8101c20e Fix void string-edit-mode
problem:
Trying to describe a key: `C-h k` `j`
shows:
Symbol’s value as variable is void: string-edit-mode

solution
Don't defer the string-edit package.
2021-03-02 11:47:28 +01:00
Maximilian Wolff 8181bc9cf2
[editing] Make string-edit confirm/abort align to conventions 2021-02-28 22:01:12 +01:00
Maximilian Wolff c3b40ce13b
[editing] Add missing documentation and make string-edit lazy load 2021-02-28 21:54:52 +01:00
Ivan Yonchovski c6ffe996b6
[editing] Added string-edit package to editing layer 2021-02-28 21:24:23 +01:00
duianto 67287faeed
[doc][spacemacs-editing] Add urls to supported packages 2021-02-23 22:26:07 +01:00
duianto 319626d1ad Bind s to the dired-quick-sort hydra
The dired-quick-sort hydra was bound to: S

But the introduction of evil-collection-dired
[evil-collection] support for dired #14333
https://github.com/syl20bnr/spacemacs/pull/14333

Now binds S to: dired-do-symlink
334670e29d/modes/dired/evil-collection-dired.el (L66)

It also restored the default evil behavior of: s
to: evil-substitute

But it isn't useful in the dired buffer since it is: read-only
2021-02-23 20:26:31 +01:00
Ivan Yonchovski b6aed092cf [evil-cleverparens] `evil-cp-change' should move the point
I have a PR for that https://github.com/luxbock/evil-cleverparens/pull/71 but it
is not reviewed for a long time. Without this change when you do `ci"` the
cursor won't go in the "".
2021-02-21 17:43:45 +01:00
tris 699be3fe28 [editing] add binding for multi-line 2021-02-20 08:02:32 +01:00
duianto 7e38f2e64e Disable evil collection unimpaired bindings
This restores the previous Spacemacs
Info-mode and help-mode buffer bindings.

for example:

before:
The square bracket keys are prefixes for one key:
"[u" 'evil-collection-unimpaired-url-encode
"]u" 'evil-collection-unimpaired-url-decode

after:
 ]                       ;; Info-forward-node
 [                       ;; Info-backward-node

 ]                       ;; help-go-forward
 [                       ;; help-go-back

Fixes: Evil keybindings for navigation no longer behave as expected in Info buffers #14375
2021-02-19 16:56:59 +01:00
Maximilian Wolff af0d0e7276 [purpose] Fix undefined magit-display-buffer-function during startup
With purpose and the new layer verification algorithm in place
it looks like the default load order changed causing
`purpose-x-magit-multi-on` to access `magit-display-buffer-function`
before is has been loaded.
2021-02-14 08:16:13 +00:00
duianto 3bb13db857 Fix home buffer ace links
Pressing o `(spacemacs/ace-buffer-links)`
on the Spacemacs home buffer `SPC b h`.

Adds an ace link (one or more highlighted letters),
at the menu buttons, and the startup list entries.

problem:
The text: `[S P A C E M A C S]` gets an ace link,
but it isn't a button.

When the [?] button has been pressed, and the Quick Help
is open, then ace links appear on the open square brackets
for each key binding, but they aren't buttons.

In the lists: recent files, projects, etc.
The ace links appear before the first / (slash).
This means that in windows they appear after `c:`.

solution:
Add the ace links at the beginning of each widget-button.
2021-02-13 09:38:23 +01:00
duianto 9375d6f54d Add missing space before defun args parens 2021-02-10 08:51:55 +01:00
Thanh Vuong ae65f3cedd
Fix #14213 remove dash and ht from core libs
- delete dash and ht in core
- reimplemented all ht functions we need in `spacemacs-ht.el` and use them
- add dash to spacemacs-bootstrap
2021-02-07 22:22:39 +01:00
duianto 60ad8194d7 Refactor spacemacs/rename-current-buffer-file 2021-02-07 21:21:41 +01:00
duianto e8c84d4b37 [base] Fix void dired-mode-map
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.
2021-02-04 19:50:54 +01:00
emacspace fbd281d710 documentation formatting: Sun Jan 31 11:47:27 UTC 2021 2021-01-31 20:57:53 +02:00
duianto ec57b21a92 Fix which-key entries: gr and gs in dired and magit
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.
2021-01-30 11:59:18 +01:00
Thanh Vuong 86a89d8fdd [evil-collection] support for dired 2021-01-30 10:17:20 +01:00
Thanh Vuong a6d364e0f2 [spacemacs-evil] add evil-collection
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.
2021-01-30 01:11:07 +00:00
Ivan Yonchovski 138d6329ef Add kill-ring to savehist-additional-variables 2021-01-26 13:51:46 +01:00
duianto 7ffcae0360
[org] Update org-enable-valign
Move the org-enable-valign variable definition
and the valign package setup to the org layer.

Document the variable.
2021-01-24 22:58:34 +01:00
duianto 92796dc121 [dotfile] new var: dotspacemacs-show-trailing-whitespace
Moved the function definitions for:
spacemacs//trailing-whitespace
spacemacs//set-whitespace-style-for-diff

from: spacemacs-default/packages.el
to:   spacemacs-default/funcs.el
2021-01-24 21:54:40 +01:00
Richard Kim c9800a3b1a fixed package name from org-super-star to org-superstar 2021-01-10 19:56:28 +01:00
duianto 61ff12cbfc [base] Show a winum required message
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.
2021-01-09 08:40:32 +01:00
duianto 444c6a7565 [defaults] Prevent fullscreen on config reload
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
2020-12-30 20:43:52 +01:00
Maximilian Wolff 0333173f18
Restore old ace bindings and revise documentation changes 2020-12-29 21:29:50 +01:00
Daniel Nicolai db819a6bbd
Add link-hint-open-link to woman-mode keybinding to navigation layer 2020-12-29 21:05:39 +01:00
Ray Wang dfd208cf89 valign-mode should be disabled in default 2020-12-28 17:16:55 +01:00
Claude 1254095217
Make valign-mode opt-out in org-mode-hook (#14211)
* Make valign-mode opt-out in org-mode-hook

* Clean org-enable-valign documentation
2020-12-19 00:01:31 +01:00
Hong Xu 47d02ba970 Use transient and set dired-quick-sort-suppress-setup-warning to 'message
Related to #14156
2020-12-16 19:14:12 +01:00
Ray 0f21303cad
Use valign to align tables in spacemacs-org layer (#14196)
* Use valign package in org-mode to align tables

* update CHANGELOG.develop
2020-12-13 22:08:36 +01:00
Daniel Nicolai c595640a34 In navigation layer, Bind J/K to scroll up/down in Info-mode
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.
2020-12-13 21:58:24 +01:00
duianto 6f830c149e Fix evil-easymotion in hybrid state 2020-12-01 09:25:34 +01:00
Robert O'Connor 43ba398450 Add evil-easymotion to the features in the README 2020-11-28 07:44:03 +01:00
Maximilian Wolff be908875cb
Change newly added which-key bindings to use keymap api
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.
2020-11-27 22:46:56 +01:00
Maximilian Wolff 75248c0b26
[core] Integrate evil-motion layer into the core
In addition add more descriptive texts
for which-keys.
2020-11-27 20:02:44 +01:00
Hong Xu 133a7b9280 Add dired-quick-sort layer
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
2020-11-27 19:11:34 +01:00
duianto 8128774090 Handle buffer move/select/swap to last win nr +1 in all frames 2020-11-19 12:36:07 +01:00
Maximilian Wolff db82eff6d2
Revise persistent scratch buffer integration
Make installation of the packages dependent
on whether they are used.

Load them lazily and add missing conventional
progn statements to init sections.
2020-11-14 09:49:04 +00:00
Ray 31cff79099
Add persistent-scratch and unkillable-scratch into core/spacemacs-editing layer (#14115) 2020-11-14 10:02:51 +01:00
Keith Pinson 61fc17c6ee [core] clear search highlights on narrow to indirect buffer
This avoids more problems found by @duianto.

Also:
* Use more descriptive variable names
* Print message explaining lack of narrowing in visual block mode
2020-10-31 09:15:12 +01:00
Keith Pinson 82974b454e [core] fix visual modes for narrow to indirect buffer
* 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
2020-10-31 08:57:46 +01:00
Keith Pinson 5b4b6af8d3 [core] fix narrow to indirect buffer from visual mode 2020-10-31 08:57:46 +01:00
Keith Pinson 603d7fbe0b [core] provide keybindings for using narrow with an indirect buffer
This is useful if you want multiple narrowing in the same base buffer.

Fixes #12550 with proposed bindings by @duianto.
2020-10-31 08:57:46 +01:00
Ray Wang 905d4392c5
Add spacemacs-scratch-mode-hook
Also run-hooks in spacemacs/switch-to-scratch-buffer

update CHANGELOG.develop and retrigger workflow
2020-10-23 18:34:25 +02:00