Age | Commit message (Collapse) | Author |
|
|
|
|
|
Check for normal and visual modes separately before defining default
mappings. Previously I was only verifying that normal mode mappings were
available and defining visual mode mappings without explicit checks.
|
|
|
|
|
|
|
|
|
|
Move hard-coded `z#` and `z*` mappings to `<Plug>` mappings.
|
|
|
|
|
|
Now that we have both forward and backward directions, use #/*-based
mappings.
|
|
Allow searching backward as well as forward.
Add new functions specific to each search direction.
Thanks to 'mattn' (https://www.reddit.com/user/mattn/) for describing
how to pass variadic arguments to a Vim function:
https://www.reddit.com/r/vim/comments/3761po/vimscript_question_passing_arguments_from_a/crk07lz/
|
|
Escape newlines so that multiline search works.
|
|
|
|
Seems right, since I'm already using `g/` in vim-nohai.
However, consider using a `#`- `*`-based mapping instead to handle
forward and backward searching.
|
|
Because of `:h function-search-undo`, using `normal! n` at the end of
the function doesn't highlight the matches with 'hlsearch' (though it
does advance to the next match).
I've seen other mappings that add a `/<CR>` or `n` to the end of the
mapping, but that doesn't work here because it's an operator, so `g@`
needs to be the last thing in the mapping. And I was reluctant to work
out how to make it an `<expr>` mapping.
Fortunately, search highlighting works when `n` is used with
`feedkeys()`.
|
|
Currently doesn't highlight correctly. Only works in normal mode for
now. Overwrites the unnamed register.
Inspired by
https://github.com/godlygeek/vim-files/blob/8714546/plugin/vsearch.vim
|