aboutsummaryrefslogtreecommitdiff
path: root/evil-commands.el
AgeCommit message (Collapse)Author
2025-03-18Fix typoKARASZI István
2025-03-02Use regular end-of-visual-line in evil-append-lineAxel Forsman
Fixes #1964
2025-02-27Fix g$ putting cursor on start of next visual lineAxel Forsman
Normal mode "g$" put the cursor on the start of the next visual line instead of the end of the current one. Fixes #1244, fixes #1963
2025-01-11Fix touch screen gestures (e.g., scrolling) for Emacs 30Johann Klähn
Emacs 30 introduces improved touch-screen support (via the Android port), see “Touchscreen Events” in the Emacs Lisp reference manual: By default, touch screen gestures are not processed when a command is bound to `down-mouse-1` (as `evil-mouse-drag-region` is), as that is taken as an indication that touch input should be translated to `down-mouse-1` followed by mouse motion events. This change applies the `ignored-mouse-command` property to `evil-mouse-drag-region` that is also present on `mouse-drag-region` in Emacs 30. This has the effect that touch screen gestures are prioritized and mouse events are only emitted when no gesture was detected.
2025-01-11Allow `evil-undo` in visual state again (undo in region)fnussbaum
Undo in region can be very useful and is supported by all undo backends. Before #1888, `evil-undo` stayed in visual state, and I think restoring this behaviour should not negatively affect the fix for #1883.
2024-12-28Fix issue: No visible text when cursor is moved to the end of bufferJames Cherti
This pull request fixes an issue where using `(evil-goto-line nil)` to move the cursor to the end of the buffer would result in no visible text. This patch draws inspiration from the built-in `(end-of-buffer)` function, which does not exhibit the same issue as calling `(evil-goto-line nil)`. Closes #1938
2024-12-12Account for large values of scroll-margin in evil-window-top+bottomTom Dalziel
2024-10-06Avoid loop in quoted listAxel Forsman
This commit circumvents the following byte compilation error: evil-commands.el:2644:2: Error: List contains a loop: (lower-right lower-left upper-left upper-right lower-right lower-left upper-left upper-right lower-right lower-left . #6) Resolves #1903
2024-07-21Fix: perf improvements broke macro repeatability. Restore it.Tom Dalziel
2024-07-16gI works in visual stateTom Dalziel
2024-07-10gi works in visual line stateTom Dalziel
2024-06-27Add :baddTom Dalziel
2024-06-19Combine after change calls during macro executionTom Dalziel
Also temporarily disable pre- and post-command hooks
2024-06-17Add c-ts-mode to evil-jump-item c major modesTom Dalziel
Fixes #1908
2024-06-17Add :view and :sview ex commandsTom Dalziel
2024-06-17Use evil-first-non-blank instead of back-to-indentation for insertTom Dalziel
Improves consistency
2024-06-16Pause hooks and undos during blockwise (bulk) insertTom Dalziel
2024-06-16Record search offset for repeatTom Dalziel
Fixes #1907
2024-06-14Track (and restore) previous visual selection, point, mark for gvTom Dalziel
2024-06-14Only restore visual if there's something to restoreTom Dalziel
2024-05-30Replace message with evil-echo where appropriateTom Dalziel
2024-05-26Allow count after C-w for window commandsTom Dalziel
Fixes #1902
2024-05-26Quit uses evil-window-delete to gain balancingTom Dalziel
2024-05-03Fix regression cauased by 55f29f0Tom Dalziel
Refactoring accidentally changed `evil-operator-state-p` to `evil-operator-state`
2024-04-30Small cleanupsAxel Forsman
2024-04-30Remove evil--visual-eol-anchoredAxel Forsman
There already exists a method for sticking to EOL: Setting temporary-goal-column to most-positive-fixnum. As such, there is no need for the variable evil--visual-eol-anchored introduced by commit e31bff8cb64d773bbfd9a8e326db8645eaee43fd. This commit also fixes a regression where "g$" made "gj"/"gk" stick to visual EOLs.
2024-04-30Don't mutate register when stripping test props during pasteTom Dalziel
Fixes an issue noticed while triaging #1894
2024-04-21Fix Visual Insert affecting one too many linesAxel Forsman
This fixes a regression caused by commit 004ac4e0cd766d49d48d53270e9c0c080ad9f173, where Visual mode "I" repeated the insertion on one too many lines unless at EOB.
2024-04-16treewide: replace `(eq/equal foo nil)` with `(null foo)`Konstantin Kharlamov
2024-04-15Always undo in normal state (#1888)Tom Dalziel
2024-04-14Visual eol anchoring, so g$ is stickyTom Dalziel
Also fixes #1876
2024-04-04evil-undo is a jump commandTom Dalziel
Partially fixes #1878
2024-04-02Fix point placement after D and C in normal stateTom Dalziel
Bug since 476f5fbcf1288c5a46a6ba35efe0b8dd1e4dd0ec Thanks to @axelf4 for spotting.
2024-04-01Don't miss a final empty line in visual block insertionTom Dalziel
2024-03-31Visual X, deletion column respects stick eolTom Dalziel
2024-03-31Add handler for expanding line for line-based operatorsTom Dalziel
Most of the work was done by Maxi Wolff (@smile13241324) over 6yrs ago. I've made a few changes, so have assumed authorship. This fixes #968
2024-01-28evil-commands: replace (backward-delete-char) with (delete-char)Konstantin Kharlamov
Fixes a warning: evil-commands.el:2125:15: Warning: ‘backward-delete-char’ is for interactive use only; use ‘delete-char’ instead.
2024-01-23No performant delete if range suppliedTom Dalziel
Fixes #1858
2024-01-04Fix pasting charwise text onto linewise selectionTom Dalziel
2024-01-02Add err-code arg to :cq ex commandTom Dalziel
2023-12-25Declare goto-char as a motion, fix evil-goto-charTom Dalziel
Tests added for evil-goto-char. Fixes #1852
2023-12-18Add :retab commandJakub Kadlcik
See "Changing tabs" section in the Vim manual https://vimhelp.org/change.txt.html#change.txt
2023-12-12Assign :jump to evil-{next-close,previous-open}-{brace,paren} (#1844)Brian Leung
2023-08-28tabs: Go to nth tab when tab-next is prefixedAnkit Pandey
This emulates the behavior of vim, where {N}gt goes to the Nth tab, but {N}gT goes back N tabs.
2023-08-27Do not silence unused evil-define-command argumentAxel Forsman
2023-08-20Some cleanupsAxel Forsman
2023-08-20Misc minor changesStefan Monnier
* README.md: Mention that `undo-fu` is also in NonGNU ELPA and update its repository URL. * evil.el: Update the undo-fu repository URL. * evil-macros.el (evil-define-interactive-code): Move the insertion of quote around `func` to the `cond` so the `quote` is not incorrectly added around lambda forms. * evil-tests.el: Add a FIXME. * evil-commands.el (evil-save-side-windows): Silence spurious warning.
2023-08-20(evil-with-delay): New macro, extracted from `evil-delay`Stefan Monnier
Save some kittens by using a macro instead of using `eval`. This also exposes more code to the compiler, so should result in more efficient code and potentially better compiler warnings. * evil-common.el (evil-unquote): Delete unused function. (evil--with-delay): New function, extracted from `evil-delay`. (evil-with-delay): New macro, extracted from `evil-delay`. (evil-delay): Redefine using `evil-with-delay` and declare obsolete. * evil-states.el (evil-visual-activate-hook): * evil-core.el (evil-define-key): * evil-commands.el (evil-execute-in-normal-state): Use `evil-with-delay`.
2023-08-20Stop the '</'> and '[/'] marks from intertwiningAxel Forsman
The function evil-visual-paste would assign to evil-visual-point/-mark the same markers used by the '[ and '] marks. Therefore, after a single visual paste Normal mode "gv" would act funkily in that buffer ever after. To reproduce: * Enter a new buffer with the contents: x y * With the cursor on "x", type "ylvpjxgv". The expectation is that "x" should be re-selected. Instead the empty lower line is selected due to it being the previously changed text. This commit fixes this, and also removes unused definitions related to evil-visual-previous-point/-mark.
2023-08-20Use lexical-binding everywhereStefan Monnier
Most of the code already used lexical-binding, but there were still a few of remnant of use of the old dynbound dialect. * evil-tests.el: Activate `lexical-binding`. (evil-test-change-state): Initialize the local vars immediately rather than as a separate step. Remove unused vars `keymap` and `local-keymap`. (evil-test-auxiliary-maps): Rename local var to `evil--map` and declare it dynbound since we need `evil-define-key` to have access to it. (evil-test-exclusive-type): Remove unused var `third`. (evil-test-text-object): Mark unused var `type`. (evil-with-both-search-modules): Move before first use. (evil-test-properties): Rename local var to `evil--alist` and declare it dynbound since we need `evil-put-property` to have access to it. * evil.el: Activate `lexical-binding`. * evil-types.el ("<addr>"): * evil-common.el (evil--eval-expr): * evil-commands.el (evil-ex-global): Tell `eval` to use the lexbind dialect of ELisp.