Commit Graph

71 Commits

Author SHA1 Message Date
057e6c531c refactor: replace doom-enlist with ensure-list
doom-enlist is now a deprecated alias for ensure-list, which is built
into Emacs 28.1+ and is its drop-in replacement. We've already
backported it for 27.x users in doom-lib (in 4bf4978).

Ref: 4bf49785fd
2022-08-07 19:43:13 +02:00
d0cdf8f5c6 fix(evil): ]f/[f opening directories
They should traverse files, not directories.
2022-06-13 01:16:22 +02:00
488ad07cc5 fix(evil): define *-any-quote directly
Defining `*-any-quote` objects via the exiting `*-block` helpers leads
to incorrect behaviour, where the trailing boundary is also included as
part of the selection (cursor on `|`, selection between `|`):

```
start: "te|st"
v i q: "|test"|
```

The expected behaviour is the same as `v i "`:
```
start: "te|st"
v i q: "|test|"
```

Fix: #5698
2022-04-25 16:38:40 +02:00
d833242de7 fix(evil): +evil/next-preproc-statement -> +evil/next-preproc-directive
+evil/next-preproc-statement does not exist.

Ref: 83387d89e9
2022-02-10 04:07:16 +01:00
1d41ee0c1a refactor(evil): use window-swap-states in +evil--window-swap
Taking a look at the built in windmove functions shows that Emacs has a
built in function for swapping windows called `window-swap-states`.
Using this ensures the window state is maintained.

Ref: #6023
Co-authored-by: luveti <luveti@users.noreply.github.com>
2022-01-27 03:43:51 +01:00
Dan
1643124104 fix(evil): window-selection-change-functions use case
`window-selection-change-functions` expects hooks to have one argument.
2022-01-27 03:33:13 +01:00
c09777b36b fix(evil): handle edge cases of embrace
If the surround key is `\(`, the text should be surrounded as
`\( text \)`. The same for `\[` and `\{`.
2021-11-25 01:45:09 +01:00
0bb4d4dfcb refactor: switch buffer/frame/window hooks
Emacs 27 introduced a bunch of `window-*-change-functions` hooks,
including `window-selection-change-functions` and
`window-buffer-change-functions`, which handles 98% of the use case for
Doom's `doom-switch-{buffer,window,frame}-hook` hooks, so I've rewritten
them to use them under the hood, which amounts to simpler code and fewer
hacks.
2021-10-10 18:36:46 +02:00
45c759d7d7 fix(evil): evil-join fails to join commented lines
Fix #5558
2021-10-05 02:33:15 +02:00
06392a723f refactor: rename orig-fn arg in advice to fn
A minor tweak to our naming conventions for the first argument of an
:around advice.
2021-08-04 01:53:12 -04:00
bd94250503 Fix #5113: "defining as dynamic an already lexical var" error
Due to a dynamic variable being let-bound while evil-textobj-anyblock is
loading, so load it first.
2021-05-30 12:21:13 -04:00
e33b21dc46 Fix #4770: New window is focused after split
According to the documentation of `evil-window-split` the variable
`evil-split-window-below` needs to be non-nil for the new window to be
created below; and for `evil-window-vsplit` it is the variable
`evil-vsplit-window-right` that needs to be non-nil for the window to be
created on the right.
2021-03-10 15:48:31 +01:00
2a4509c42a editor/evil: fix typo in +evil-window-split-and-follow
And conform these commands to naming conventions.
2021-03-06 10:31:10 -05:00
0917187f20 editor/evil: bind C-w {S,V} to split-and-follow 2021-03-06 09:59:50 -05:00
c049480cbd Fix evil-join filling non-comments poorly 2021-02-25 13:59:43 -05:00
6c163d77d9 Fix +evil:retab 2021-02-02 02:38:12 +01:00
198712060a Fix +evil--insert-new-line advice when opening new line inside a comment.
`comment-line-break-function` requires a single `soft-newlines` argument.
2021-01-17 15:53:23 +02:00
6970903a43 Fix #4465: >,< not shifting whole lines
This fixes make > and < behave as it does in vim in regular visual mode.
2021-01-03 17:18:43 -05:00
765b6dcfca Unset unused markers
In case of overlay leaks.
2020-12-12 15:56:36 -05:00
d149c59d2e Add emacs mode checks to insert mode checks
This is to accommodate users who default to emacs mode, rather than
insert mode. The two are also very alike, so many of these checks should
apply to both (almost) equally.
2020-12-11 17:38:09 -05:00
d21d86aafc Add single quotes to ‘any quote’ text objects 2020-10-28 08:48:01 +01:00
164b997cb0 Add q text-object for all quotes 2020-10-27 23:18:06 -04:00
40cf6139ed Make evil-join remove comment delimiters
See emacs-evil/evil#606
2020-08-09 01:50:41 -04:00
d12752324a Introduce letf! convenience macro
A more succinct cl-letf, which allows for local functions and macros.
2020-04-29 23:48:21 -04:00
c1127a5bde Rewrite move/copy/delete file commands
To use rename-file, copy-file and delete-file, so these commands can
enjoy the benefits of any plugins that have advised these, like org-roam
does for rename-file.
2020-04-27 01:51:18 -04:00
50ff934ff2 Fix #2832: filename modifiers replaced with empty strings 2020-04-26 04:12:33 -04:00
bce0cc2152 Change how evil-easymotion is lazy loaded
Fixes an issue where gs wouldn't work after an operator.
2020-04-14 15:41:54 -04:00
427ed2bbc0 Fix +evil:defun-txtobj docstring 2020-03-23 18:23:22 +01:00
fcac85fc86 Make +evil:copy-this-file autoload interactively 2020-03-03 20:02:07 +02:00
888d456dc9 Fix #2524: :make executing wrong command 2020-02-20 17:42:58 -05:00
dbf9c92b48 Fix +evil-resolve-vim-path-a not removing excess backslashes 2020-02-20 00:51:55 -05:00
1575300ad4 Add iu/au text-object for urls #2484 2020-02-04 13:58:43 -05:00
fe0c5e135d Fix #2293: easymotion with evil operators
Reverts fix for #1672, but provides a workaround:

  (map! :n "gl" (λ! (+evil/easymotion 'normal 'global)))
2020-01-28 17:50:11 -05:00
1b779bf716 Fix evil ex fname modifiers consuming char just before #/%
':e test-%:t.el' in filename.el should open test-filename.el, but
instead opened testfilename.el.
2020-01-20 19:14:25 -05:00
dcb0b6042e Ensure evil-easymotion is lazy-loaded
The evilem-create calls were pulling it in early, at startup.
2019-12-27 01:54:01 -05:00
d1f4a77fbb Fix vestigial reference to old help-search-headings fn 2019-12-26 16:50:49 -05:00
adc8cba14b Revise docstrings & minor reformatting 2019-12-26 01:41:44 -05:00
baae6b1711 Rename +evil/paste-preserve-register => +evil/alt-paste
Now does the invers of evil-kill-on-visual-paste
2019-12-21 03:59:46 -05:00
27cabea6b6 Fix gs in org-mode #2218
Also makes +evil/easymotion generic; it can now be moved to any key, and
new keys can be added to the <easymotion> event, rather than having to
wait for evilem-map to become available.

Also fixes +org/goto-visible if used before avy is loaded.

Relevant to #1672
2019-12-20 13:40:06 -05:00
199a6fab79 Fix typos 2019-12-01 22:31:19 -05:00
26c8f5c6ef Bytecompiler bytecompiler, won't you shut up 2019-11-23 01:21:25 -05:00
449ddb986c Minor refactors & reformatting across the board 2019-11-15 22:17:31 -05:00
03e9dc1daf Follow up on 64222c69c
To fix cases where comment-line-break-function's first argument isn't
optional.
2019-11-15 22:17:31 -05:00
46bea60ad3 Add :Read ex command & 'SPC i p' keybind
This can be used to extract paths from evil-ex style paths. e.g. the
following inserts the stdout into the current buffer (assuming we're in
~/some/project/filename.c):

  :R!echo %:P      ~/some/project
  :R!echo %:t      filename.c
  :R!echo %:e      c
  :R!echo %:r      filename
  :R!echo ~/another/project/%:t:r.h
    ~/another/project/filename.h
  :R %             contents of current file

http://vimdoc.sourceforge.net/htmldoc/cmdline.html#filename-modifiers
has a full list of vim filename modifiers. Doom doesn't support all of
them, but it does support most of them.
2019-11-15 22:17:30 -05:00
1d09e4655a Fix split-window & update docstring 2019-10-29 18:27:19 -04:00
43030c789e editor/evil: revert focus-on-split behavior (and refactor advice)
Focus-on-split is being disabled to achieve vim parity. The advice is
still necessary to ensure splitting updates the window buffer list, so
operations like winner-undo undoes correctly.
2019-10-29 01:09:14 -04:00
9e2b0c6332 editor/evil: fix autoload for +evil:whole-buffer-textobj 2019-10-28 23:23:13 -04:00
83387d89e9 editor/evil: move vim-unimpaired motions
To the unimpaired library
2019-10-26 00:37:51 -04:00
f2b77fe2c0 Add whole-buffer (g) and defun (f) text objects 2019-10-26 00:37:12 -04:00
7654764713 editor/evil: update docstring for +evil:align* commands 2019-10-10 21:38:08 -04:00