| Age | Commit message (Collapse) | Author |
|
Empty matches used to stop the highlighting of further matches. The
new behavior is not to stop on empty matches but guarantees that point
is moved at least one character. This addresses #140.
|
|
Those are replaced by their corresponding control characters as usual.
This addresses #140.
|
|
|
|
The code that performs the replacement of backslash codes is now
contained in its own function `evil-transform-regexp', the old
function `evil-transform-regexp' is being renamed to
`evil-transform-vim-style-regexp' and calls `evil-transform-regexp'.
This allows to use the backslash replacement in other situations, too.
|
|
Vim-style regular expressions can be enabled using the
`evil-ex-search-vim-style-regexp' customization variable (default is
nil). If set to non-nil, the interactive search and the ex substitute
command support Vim-style backslash codes. Note that the isearch
search module always uses plain Emacs regular expressions because it
is backed by the Emacs isearch package. If one wants to use vim-style
regexp for interactive search the evil built in search module must be
enabled using the `evil-search-module' customization variable. This
closes #141.
|
|
The :substitute command is extended by capabilities for repeating the
previous substitute. If the pattern is empty the previous pattern is
used. If the replacement equals "~" the previous replacement is used.
If flags equals "&" the previous flags are added to the new flags.
|
|
The global variables remain unchanged during the interactive
substitute. They get their new value if and only if the command is
being executed. This allows to access the parameters of the previous
substitution during the current interactive substitution and to handle
special repeating patterns accordingly.
|
|
Such a search has never an offset.
|
|
Bind `case-fold-search' according to `search-upper-case'
in `evil-search'.
|
|
|
|
The old implementation incorrectly handled each match for each window
in which that match is visible. This resulted in multiple calls of the
match-hook for each match which in turn showed duplicate replacements
in interactive substitute. The new behavior is to collect all visible
ranges first and compute their union afterwards. The update of the
highlighting is then done w.r.t. to this union, hence each match that
is visible in at least one window is handled exactly once.
This fixes #104.
|
|
This fixes issue #105.
|
|
Since `format' et al. interpret "%" characters as format
specifications, one should never pass an arbitrary string as the
first argument of such functions. Instead, pass "%s" as the first
argument and the string as the second:
(format "%s" ARBITRARY-STRING)
Thus, this commit replaces (evil-echo ARBITRARY-STRING) with
(evil-echo "%s" ARBITRARY-STRING), and so on.
|
|
This is now guaranteed for `evil-ex-search-start' and
`evil-ex-search-next' and all functions using one of them.
|
|
That patch changes the definition of `evil-ex-define-argument-type' to
be usable with the completion-at-point framework. Thus, besides
activating and deactivating the argument handler, the completion of
arguments must be implemented according to the variable
`completion-at-point-functions'. The function `evil-ex-complete' is
removed in favor for `evil-ex-completion-at-point'.
The new framework allows for better selective programmed completion.
|
|
According to the GNU Emacs Lisp Reference Manual, section 12.7,
#' is a short-hand for `function' and serves as a note to the
compiler that the argument can safely be compiled. It also works
as a sort of comment when quoting the name of a function:
#'SYMBOL = (function SYMBOL) = (quote SYMBOL) = 'SYMBOL
Since `lambda' is defined in terms of `function', the compiler will
compile unquoted `lambda' expressions anyway. Still, this convention
makes the source code more readable, and is similar to the usage of
#' in Common Lisp.
|
|
This patch also cleans up a lot of the ex interactive search code.
|
|
search matches
|
|
Add the variable `evil-ex-grammar' for defining the minilanguage
of Ex, which is passed to `evil-parser'. The function `evil-ex-update'
refreshes the evaluation tree; when applicable, it also refreshes
parse-specific variables like the current command, argument, etc.
Furthermore, it is now possible to define key sequences that execute
a command immediately when entered. Such shortcuts go in `evil-ex-map'
(the completion bindings have been moved to `evil-ex-completion-map').
Note that some of the variable names have been simplified: e.g.,
from `evil-ex-current-cmd' to `evil-ex-command' and from
`evil-ex-current-cmd-force' to `evil-ex-force'. `evil-ex-message'
has been renamed to `evil-ex-echo' for consistency with `evil-echo'.
|
|
When `evil-delimited-arguments' is unable to produce the required
number of arguments, it should pad the list with nil elements.
|
|
Since :global and :substitute share argument syntax, do the parsing
in the argument handler, using the function `evil-delimited-arguments'
to parse any specific number of arguments.
|
|
command (fixes #34)
|
|
This addresses issue 50 except for //; and only for evil's own
interactive search module, not for the isearch module.
|
|
Position point at the beginning of the match before comparing
against the previous position. Disable highlighting when the
search was done in Operator-Pending state.
|
|
Break up particularly long lines and phrase the first sentence
of the docstrings in the imperative.
|
|
For some reason the meaning of the global variable `case-replace' used
by `perform-replace' and the FIXEDCASE argument of
`match-substitute-replacement' are inverted, i.e. we have to use (not
case-replace) as value for FIXEDCASE to achieve the same results.
|
|
|
|
When "C-g" is used to abort a search, the original position of point
should be restored.
|
|
Prevent `kill-all-local-variables' from clearing Evil's buffer-local
variables, by setting their `permanent-local' symbol property to t.
Buffer-local variables are ordinarily cleared whenever the major mode
changes, but this is inappropriate for Evil as it may prevent the
current state from being exited properly (unreferenced overlays and
markers, etc.). Also set the `permanent-local-hook' property for
buffer-local hook functions.
|
|
Merge evil-motions.el, evil-operators.el and evil-window.el into
evil-commands.el. Merge evil-insert.el, evil-visual.el and
evil-replace.el into evil-states.el. Merge evil-interactive.el and
evil-types.el into evil-types.el. Merge evil-compatibility.el and
evil-undo.el into evil-common.el. Move macros into evil-macros.el.
|
|
Also add some test cases.
|
|
|
|
|
|
For consistency with "*" and "#", "gd" must enclose its search
string in \_< ... \_>.
|
|
|
|
|
|
`evil-ex-substitute' now requires point is moved to the next line when
moving via `forward-line' and not just to the end of the last line.
|
|
These are cl.el macros, cf. commit 0b0e09e.
|
|
Since 375b273 interactive forms of operators have to contain an
explicit <R> or <r> which has not been changed in both operators.
|
|
Replace calls to `read-key' with `evil-read-key', which is now
defined in evil-compatibility.el. Also add some `fboundp' guards
where necessary.
|
|
Merge `evil-define-interactive-code' and `-function' into a single
macro with an optional PROMPT argument. Specify command properties
before the function body for consistency with other macros.
Move all code definitions into evil-interactive.el and rename
`evil-eval-interactive' to `evil-interactive-form' and
`evil-interactive-codes-alist' to `evil-interactive-alist'.
|
|
|
|
avoid name clash.
|
|
|
|
Enclose interactive substitution code in (progn ...) so that
`unwind-protect' is used correctly.
|
|
Current window and current buffer are changed to minibuffer before
calling `evil-ex-message'.
|
|
These macros and functions are special because they must be available
at compile-time (`evil-eval-interactive' is used in
`evil-define-command'). Furthermore calls to
`evil-define-interactive-code' must evaluate at compile-time in order
to set the variable `evil-interactive-codes-alist', which must be
available whenever a code is used in a command definition.
|
|
Simplify and highlight all occurrences when replacing interactively
the first match per line.
|
|
|
|
|