Open mplanchard opened 2 years ago
Is there a workaround for this? This has been an issue for as long as I remember. d f SPC x
to delete the leftover space has become muscle memory by now but it would be great to not have to do that.
EDIT: Setting evil-snipe-skip-leading-whitespace
to nil
gets rid of the issue, though disabling that option isn't always desirable.
I took a look into this issue (for it buggerth me greatly).
Workaround: Set evil-snipe-skip-leading-whitespace
to nil
.
Its use is also the culprit in evil-snipe--seek
. Whatever it is supposed to be doing. It is not doing it.
What did you expect to happen?
Evil commands operating forward to space, e.g.
d f SPC
, should move up to and including the space, matching forward motion, e.g.f SPC
, which moves to the space.For example, with the text below, and the cursor in the indicated position:
Pressing
d f SPC
should result inThe same should apply to changing (
c
) and yanking (killing in emacs parlance) (y
).What actually happened?
Commands operating forward to a space, e.g.
d f SPC
, act only up to the space, not including the space itself, matching the expected behavior fort
rather thanf
.For example, with the text below and the cursor in the indicated position:
Pressing
d f SPC
yields (note the extra space):This seems to happen regardless of major mode (including both text and fundamental mode), and can be replicated in the doom sandbox plus modules minus private config, but not vanilla doom. My colleague has also seen this issue on a fresh install of doom emacs, running emacs from the terminal rather than in GUI mode.
Note that this does not affect forward motion, e.g.
f SPC
. That behaves as expected, moving the cursor to the next space character.Describe your attempts to resolve the issue
To verify the source of the behavior, I ran vanilla doom via the sandbox (
C-c C-d
), opened a text file, and enabledevil-mode
, andevil-snipe-mode
. I verified the behavior of commands liked f SPC
work as expected. I then enabledevil-snipe-override-mode
and observed thatd f SPC
and friends do not delete up to and including the space.I also verified on my regular emacs session that disabling
evil-snipe-override-mode
, which is enabled in doom by default, restores the expected behavior.I initially opened an issue in doom for this, but then after some more searching in the doom configs, I found that it was enabling
evil-snipe-override-mode
, gave that a shot, and discovered it to be the cause. That issue is hlissner/doom-emacs#6041.Steps to reproduce
SPC h E
)C-c C-d
)M-x find-file
and open a text fileM-x evil-mode
M-x evil-snipe-mode
d f SPC
behaves as expectedM-x evil-snipe-override-mode
d f SPC
no longer behaves as expectedPackage commit
a79177df406a79b4ffa25743c752f21363bba1cc
System Information