aboutsummaryrefslogtreecommitdiff
path: root/evil-commands.el
AgeCommit message (Collapse)Author
2019-12-03Handle empty buffer when shifting left/rightVasilij Schneidermann
Closes #930
2019-12-03Remove unnecessary check for emacs-major-versionBet4
2019-12-03Use window-body-height to get the number of visible linesBet4
2019-12-03Fix the asymmetry between posn-at-point and posn-at-x-y when header line is ↵Bet4
enabled
2019-11-27Fix usage of too new macro `ignore-error'Eivind Fonn
Fixes #1206
2019-11-25xref: get identifier from backend instead of getting it ourselvesEivind Fonn
Some more advanced backends require this to work.
2019-11-25Change evil-goto-definition to use a hookVasilij Schneidermann
2019-11-19Fix indentationEivind Fonn
2019-11-19Prevent errant scroll on mouse clickAaron Jensen
See https://debbugs.gnu.org/cgi/bugreport.cgi?bug=31546
2019-11-19Fix dispatch in evil-yank for visual-line-modeJustin Burkett
Make evil-yank aware of screen-lines
2019-11-19Make more commands support visual-line-modeJustin Burkett
when evil-respect-visual-line-mode is non-nil, including evil-change-line, evil-delete-line, and evil-yank-line. Most of the work is done through the motions evil-line-or-visual-line and evil-end-of-line-or-visual-line. These motions use visual lines when visual-line-mode and evil-respect-visual-line-mode are non-nil, and revert back to standard lines otherwise. Visual selection via visual lines in the sense of visual-line-mode is supported by adding a new screen-line type (named to avoid confusion with visual state).
2019-11-05Unwed evil-move-beyond-eol and evil-move-cursor-backJustin Burkett
The docstring of evil-cursor-back only mentions that it applies to moving the cursor back when exiting insert state, but in many cases it was tied to also moving the cursor when reaching the end of the line. We have evil-move-beyond-eol to control that behavior, and there doesn't seem to be a good reason that the two must be tied together. Fixes #1178
2019-07-29Merge branch 'more-visual'Eivind Fonn
2019-07-28Fix previous commit when evil-cross-lines is tJustin Burkett
2019-07-28evil-show-registers: Show macros stored as vectorsMiciah
When displaying register contents, evil-show-registers substitutes the empty string for non-string values. If a register contains a macro, then the value is a key sequence, and a key sequence may be represented by either a string or a vector. The latter would be substituted by the empty string. This commit checks for vector values and uses key-description to display them. * evil-commands.el (evil-show-registers): If a register contains a vector, display it by calling key-description.
2019-07-20Teach more commands about evil-respect-visual-line-modeJustin Burkett
The following commands now act on visual lines when evil-respect-visual-line-mode is non-nil: evil-insert-line evil-append-line evil-find-char evil-find-char-backward evil-find-char-to evil-find-char-to-backward
2019-01-04Bump version to 1.2.141.2.14Eivind Fonn
2018-09-14fix for append from visual statedenin
2018-03-04:global should take into account evil-ex-search-caseEvgeni Kolev
2018-02-22Merge pull request #1022 from emacs-evil/goto-mark-jumpVasilij Schneidermann
Treat going to marks jumps
2018-02-22Treat going to marks jumpsEvgeni Kolev
2018-02-21evil-ex-global: parse COMMAND only once, not on each matching lineEvgeni Kolev
2018-01-03Fix compiler warning in previous commitJustin Burkett
2018-01-03Reveal hidden search terms in evil-ex-substituteJustin Burkett
Do this by simulating the effect of turning on reveal-mode when the substitution requires confirmation. Fixes #983
2018-01-03Merge pull request #1010 from justbur/ex-sub-final-pointVasilij Schneidermann
Don't move point following ex-substitute search
2018-01-03Use xref-find-definitions if possibleVasilij Schneidermann
Closes #952
2017-12-29Don't move point following ex-substitute searchJustin Burkett
The current behavior isn't consistent with vim (at least in my tests). It's also annoying to have point jump to weird locations following an aborted search. For example, with :%s/a/b/c If you abort the search with C-g before making replacements, point jumps to the beginning of the region which is the beginning of the buffer in this case. This is odd, because nothing happened but you lose your place in the buffer.
2017-11-29Fix parens in evil-ex-substituteJustin Burkett
2017-11-29Merge branch 'master' of https://github.com/amosbird/evil into amosbird-masterVasilij Schneidermann
2017-11-22Remove dependency on clJustin Burkett
Replace caddr in evil-test-helpers.el with primitive functions.
2017-11-21Exit search upon reaching end of region in evil-ex-substituteJustin Burkett
It's possible that we have a regex that matches just the end of the buffer repeatedly. Add test.
2017-11-20Fix detection of newlines in evil-ex-substituteJustin Burkett
Use the resulting match instead of the input string in case the regex matches a newline without containing one explicitly. Ref #969
2017-11-11Decode mouse control sequencesFice T
`xterm-mouse-mode' uses control sequences for mouse events which need to be decoded, otherwise each character in the sequence will be executed as a command. Fixes #960.
2017-10-31Make evil-ex-substitute ignore read only matches.Amos Bird
This patch make evil recognize `query-replace-skip-read-only` variable and ignore read only matches while substituting. This is useful in wgrep and wdired mode.
2017-10-25Extended docstring for evil-find-char.Th. Rikl
Documented the dependency from 'evil-cross-lines' custom variable.
2017-10-07Extend error message when folding isn't supportedEvgeni Kolev
Fix #932
2017-10-04Merge pull request #927 from edkolev/dont-abort-macro-on-buffer-changeVasilij Schneidermann
Don't abort macro recording when current buffer is changed
2017-10-03Escape parentheses and space characters properlyVasilij Schneidermann
2017-10-02update version to 1.2.131.2.13Eivind Fonn
2017-09-29Don't abort macro recording when current buffer is changedEvgeni Kolev
Refs #847
2017-09-04evil-commands.el: Add a configurable list of evil-change commandsJay Kamat
* evil-commands.el (evil-forward-word-begin): Instead of hardcoding #'evil-change to apply workarounds, read from a `evil-change-commands' list instead. This patch adds a new variable, `evil-change-commands', which defines functions that evil will treat as bound to 'c'. When wrapping `evil-change', add your function to this list to get the same behavior as `evil-change'. Example usage: (add-to-list 'evil-change-functions #'my-evil-change)
2017-09-02Eliminate a few byte compiler warningsYork Zhao
2017-07-25Try to handle special cases better in evil-ex-substituteJustin Burkett
One special case occurs with the ex commands ":s/^/ #/" or ":'<,'>s/^/ #/". The range passed to evil-ex-substitute includes the final newline which means that the zero-length regex "^" will match on the line below the intended range. This is now checked for explicitly. Another occurs using the regex "$", as in ":%s/$/ TEST". In this case, after the replacement occurs point is still looking at the end of the same line. To test for this case, when there is a zero-length match we test the next search to see if point won't move following the next (successful) search. If so, we move point explicitly. Finally, this fixes an issue where we could inadvertently move point past end-marker. This wasn't a big deal, but it did print a message in the *Messages* buffer. Fixes #881
2017-07-09Wire up semantic and tags for "goto-definition" when available v2Constantine Kharlamov
I am trying imenu first because I vaguelly remember that on a rare occasion, when both are available, it's better than semantic. At the very least because semantic have to parse includes/imports as well, when imenu might already have the info about location of the definition. v2: wasamasa: use (ignore-errors) Signed-off-by: Constantine Kharlamov <Hi-Angel@yandex.ru>
2017-06-23Fix regression in evil-ex-substitute with nxml-modeJustin Burkett
nxml-mode somehow changes the match data during the course of using evil-ex-substitute with the gc flags. Make evil-ex-substitute very careful about using the right match-data for moving point and performing replacements. This should not be necessary, but I guess we can't rely on modes to be careful about not overwriting the match data randomly. Fixes #859
2017-06-15Add evil-kill-on-visual-paste optionJustin Burkett
Allows one to prevent evil-visual-paste from automatically adding the replaced text to the kill ring, which changes what will be pasted next.
2017-06-12Prevent infinite loop in evil-ex-substituteJustin Burkett
Zero length regexps, particularly "$", may get matched over and over. Also add a test for this. Fixes #849
2017-06-01Add helper evil-ex-delete-or-yank to remove code duplicationEvgeni Kolev
2017-05-31Add support for passing REGISTER and COUNT to :yankEvgeni Kolev
2017-05-20Fix minor issue with evil-paste-from-registerJustin Burkett
With point on a word, :%s/<C-r><C-w> gives an end of buffer warning from the forward-char at the end of evil-paste-from-register.