aboutsummaryrefslogtreecommitdiff
path: root/evil-vars.el
AgeCommit message (Collapse)Author
2025-01-21Fix Emacs warningsNikolai Korolev
``` » Warning (comp): evil-vars.el:561:25: Warning: the function `evil-delete-backward-word' is not known to be defined. » Warning (comp): evil-vars.el:565:25: Warning: the function `evil-delete-backward-word' is not known to be defined. ```
2025-01-08Mark evil-shift-width safe as a local variableamnore
2024-07-10make C-w in ex, search, and eval match insert and replace (#1922)Lily
* make C-w in ex and search match insert and replace merely changed bindings and added a test * fix evil-delete-backward-word in ex test
2024-06-14Track (and restore) previous visual selection, point, mark for gvTom Dalziel
2023-12-25Declare goto-char as a motion, fix evil-goto-charTom Dalziel
Tests added for evil-goto-char. Fixes #1852
2023-12-12Add racket-repl-mode to evil-insert-state-modes (#1847)Brian Leung
2023-09-08Add the missing quote for obsoletedalu
Otherwise it will pop an error after this commit https://github.com/emacs-mirror/emacs/commit/802a54ad620 For ref: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=62248
2023-08-27Reselect minibuffer when quitting command-line winAxel Forsman
Pressing C-f while editing an Ex command to open the command-line window and later quitting that window used to not reselect the Ex command line, but instead just continue the recursive edit in some previous window. This was specially confusing before commit 02004bce6884619e687654d333b75c90f8fc27d0, as the evil-ex-abort hack did not trigger, leaving you in a bad state with evil-ex-current-buffer set to t. This commit fixes that by setting the delete-window window parameter on the command-line window to a function that switches back to the minibuffer after deleting the window, which closes #1379. This commit also replaces the split-window call with a display-buffer invocation, to always spawn the window at the bottom of the frame, but also allow the user to override this behavior.
2023-08-27Add evil-command-line-mapAxel Forsman
There was a lot of duplication between evil-ex-completion-map and evil-ex-search-keymap, which meant that any rebinds had to be done twice. This commit fixes that by introducing evil-command-line-map as a common ancestor of the two keymaps. Also renames evil-ex-map to evil-ex-shortcut-map to avoid confusion, as its purpose is more niche than evil-ex-completion-map which functions the same as any other keymap passed to read-from-minibuffer.
2023-08-20Some cleanupsAxel Forsman
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-13Urgent revert of recent commits while evil is brokenTom Dalziel
Some of these commits can be almost immediately restored, once the time is found to do so. Revert "Fix evil-with-delay with dynamic binding" This reverts commit 1e9b2434264529fe0dd964b68fe89236a4abeac3. Revert "Some cleanups" This reverts commit 0cbd61f2de104fab16602d0418605cd0513b16f3. Revert "Misc minor changes" This reverts commit b291039b0c6ffc3b2f3c9f02b8ad2f0041127b12. Revert "Merge evil-with-delay condition and body lambdas" This reverts commit 1b56ffcc102b4c5f8b015e760b5f9cf5932622af. Revert "(evil-with-delay): New macro, extracted from `evil-delay`" This reverts commit 3d7faadf30016a8c20699a5fb1b5731b8a49dcd2. Revert "Make evil-search-wrap-ring-bell work with evil-search" This reverts commit 5e72cf5b6d57b785ea229236bb5c4638db2c9a05. Revert "Stop the '</'> and '[/'] marks from intertwining" This reverts commit 26db9441a13ebedb2481d7ada4c3b5e60ec22795. Revert "Remove redundant `:group` args" This reverts commit 6e30037fdc6a275d78d6b82d89bd8e47bcf4d4e3. Revert "Avoid eval in evil-test-buffer" This reverts commit 27d81ad406d2d3e07591b927357d2354ef5b5c65. Revert "Use lexical-binding everywhere" This reverts commit 44c7f301468c264a781be4ee8ae879fe1b457e60.
2023-08-12Some cleanupsAxel Forsman
2023-08-09Stop 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-07Prefer #' to quote function namesStefan Monnier
2023-08-07Better follow conventions for ' in docstringsStefan Monnier
Also try and make the docstring fit within 80 columns. This fixes some incorrect uses and eliminates some warnings.
2023-08-06Support recursive editing in ExAxel Forsman
This is a proper fix for #569 instead of commit ab0f6a546e6c703cd8d3c0d7c1035196b0455c45, which simply aborted the Ex command line upon it being unfocused. Apart from disallowing recursive editing, that also made debugging Ex errors impossible. The core issue was that evil-ex-current-buffer had a dual purpose: (I) While in the minibuffer, it stored the original buffer the Ex command would eventually act on, and was used for special registers and some argument handlers; and (II) While executing an Ex command it was non-nil, which signified that commands should use the variables evil-ex-range, evil-ex-bang and evil-ex-argument set by evil-ex-call-command, instead of, say, prompting for a motion. However, during recursive editing due to (I) evil-ex-current-buffer was dynamically let-bound, triggering the special behavior in (II), meaning all operators always worked on the evil-line motion, i.a. Fix this by, for (I), only setting evil-ex-current-buffer buffer-locally in the Ex minibuffer, renaming it to evil-ex-original-buffer (similar to minibuffer--original-buffer), and for (II) instead introducing evil-called-from-ex-p which is set to t solely during evil-ex-call-command. Closes #1415, by only making use of the return value of minibuffer-selected-window where required.
2023-07-18Delay evil-ex-search-update-pattern until idleAxel Forsman
2023-07-17Read Ex commands from bufferAxel Forsman
When lexing a string with string-match and its START argument, there is no way to anchor matches to the START position. Instead, one must either allocate substrings - as done prior to commit 56b43b6f7e014e905f85df1c542c67f46ea99566 - or use looking-at etc., instead. This commit opts for the latter. The Ex completion-at-point functions are also rewritten in order to avoid having to add ex-index text properties to the command string, since evil--ex-syntactic-context could be extended to provide that information just as easily.
2023-07-02Remove evil-repeat-start-hookAxel Forsman
It was a no-op since (evil-repeat-type this-command t) does not returns t, and otherwise the call to evil-repeat-start would overwrite changes done by (funcall repeat-type 'pre) in evil-repeat-pre-hook.
2023-07-02Store command properties as symbol propertyAxel Forsman
Also replace a few calls to evil-filter-list that destructively modified user-provided lists with cl-remove-if.
2023-06-02Global print using messageTom Dalziel
2023-03-04Remove evil-last-read-digraph-char hackAxel Forsman
With the Evil repeat system now aware of read-key, there is no need for the digraph repeat workaround introduced by commit dba2fa9907cf096f5e615df2e8b0381b643d47ee.
2023-02-14Compile Ex parserAxel Forsman
This commit reworks the function evil-parser into a macro that in turn expands to a parser. Some features that were not utilized have been dropped: * The GREEDY flag allowed backtracking to kick in instead of reporting an incomplete match. However the rules in cases where they are not deterministic are already listed in order of longest first. Lookaheads can still be used for this purpose. * Parsing is now always whitespace insensitive, but this is reversible without any hassle. * String replacement semantic actions. * (+ ...) rules no longer implicitly use seq. * Computation of the syntax tree has been deferred until when completion is requested.
2023-01-07evil-show-paren-range: fix incorrect docstringBrian Leung
2022-12-29Make evil-mode-line-format recognise nil valueProtesilaos Stavrou
2022-11-05gp & gP linewise & blockwiseTom Dalziel
2022-10-24evil transient mouse selection (#1706)Tom Dalziel
2022-10-17Add evil-execute-last-recorded-macro à la nvimTom Dalziel
2022-10-13 Remove make-variable-buffer-local from variables (fixes #1416)Ghosty
- make-variable-buffer-local should not be used for user-option variables according to the emacs elisp manual. See 12.11.2 Command: make-variable-buffer-local
2022-10-13Shorten doc-stringsTom Dalziel
2022-10-05evil-ex-completion-map/evil-ex-search-keymap respect evil-want-C-w-deletejixiuf
2022-09-29doc: follow the Emacs Lisp Style Guidedalu
2022-09-26Store digraph character directly for repetitionTom Dalziel
Fixes #1675
2022-08-25Store :/ search pattern and parse vim-style regexpTom Dalziel
Fixes #1520
2022-08-09It's more useful if vP flips `evil-kill-on-visual-paste`Tom Dalziel
2022-08-07Never kill on visual paste when using evil-paste-beforeTom Dalziel
This is pretty new in Vim (Jan 2022)
2022-07-31Add `evil-enter-replace-state` & support replace repetitionTom Dalziel
2022-06-21Prompt user to reverse reversed ex rangeTom Dalziel
Fixes #1628
2022-05-07Mention evil-move-beyond-eol in docstring of evil-move-cursor-back (#1375)Kevin Brubeck Unhammer
aa3ea1dcfc54fe25581841a8685679d482e99b3f unwed these, but they should still keep in touch (so people can easily find out why behaviour changed).
2022-04-30Add `evil-v$-excludes-newline`Tom Dalziel
Deprecate `evil-want-visual-char-semi-exclusive`. Fixes #897
2022-04-25Bump version to 1.15.0Tom Dalziel
2022-04-18evil-vars: Update evil-insert-state-modesBrian Leung
haskell-interactive-mode and utop-mode are REPL-like modes that both inherit from fundamental-mode, so they need to be explicitly listed here.
2022-04-12Add option for non-incremental search (#1304)fermata101
2022-02-17Add C-h in insert + replace states (fixes #1577)Tom Dalziel
2022-02-01Fix beginning/end-of-current-sentence marker (#1574)Brian Leung
* evil-vars.el (evil-markers-alist): Adjust to new name
2022-01-07Add `evil-want-empty-ex-last-command` to varsTom Dalziel
fixes #883
2022-01-07Fix visual-paste-pop testsTom Dalziel
2021-11-17Fix #1518: "custom functions bound to '0' break motion parsing" in a saner ↵jmmathena
way (#1534) * Try just comparing to '0' * Remove cruft and clean things up * Remove magic number
2021-11-16Add option to stop updating X PRIMARY selection with the current visual regionChen Bin
Vim user can select a region in visual mode and press the key `p` to replace the selected text. But in GUI Emacs, the selected text might not be replaced when: - `select-enable-primary` is `t` - Third plugins override `interprogram-paste-function` (xclip.el, for example) - Clipboard managers syncronise data between PRIMARY and CLIPBOARD selection It's because the visual commands automatically insert the content of visually selected region into X PRIMARY selection. But paste commands call the api `current-kill` which calls `interprogram-paste-function`. Value of `interprogram-paste-function` is `gui-selection-value` which might return CLIPBOARD or PRIMARY selection.