⚠️ Deprecated This plugin is no longer necessary since the main functionality is now built into vim/neovim
See:
incsearch.vim incrementally highlights ALL pattern matches unlike default 'incsearch'.
incsearch.vim provides simple improved incremental searching.
You can use it comfortably like the default search(/
, ?
).
It supports all modes (normal, visual, operator-pending mode), dot-repeat .
,
{offset}
flags, and so on.
incsearch.vim aims to be simple, but at the same time, it offers useful features.
You can see all patterns that the given regular expression matches all at once while incremental searching.
NeoBundle 'haya14busa/incsearch.vim'
Plugin 'haya14busa/incsearch.vim'
Plug 'haya14busa/incsearch.vim'
git clone https://github.com/haya14busa/incsearch.vim ~/.vim/bundle/incsearch.vim
map / <Plug>(incsearch-forward)
map ? <Plug>(incsearch-backward)
map g/ <Plug>(incsearch-stay)
<Plug>(incsearch-stay)
doesn't move the cursor.
README introduces some features, but please see :h incsearch.vim for more information.
Farewell, nnoremap <Esc><Esc> :<C-u>nohlsearch<CR>
!
This feature turns 'hlsearch' off automatically after searching-related motions.
" :h g:incsearch#auto_nohlsearch
set hlsearch
let g:incsearch#auto_nohlsearch = 1
map n <Plug>(incsearch-nohl-n)
map N <Plug>(incsearch-nohl-N)
map * <Plug>(incsearch-nohl-*)
map # <Plug>(incsearch-nohl-#)
map g* <Plug>(incsearch-nohl-g*)
map g# <Plug>(incsearch-nohl-g#)
Move the cursor to next/previous matches while incremental searching like Emacs.
Mapping | description |
---|---|
<Over>(incsearch-next) |
to next match. default: <Tab>
|
<Over>(incsearch-prev) |
to prev match. default: <S-Tab>
|
Mapping | description |
---|---|
<Over>(incsearch-scroll-f) |
scroll to the next page match. default: <C-j>
|
<Over>(incsearch-scroll-b) |
scroll to the previous page match. default: <C-k>
|
Now, incsearch.vim provides some (experimental) API. You can implement or use very useful yet another search command
:h incsearch#go()
:h incsearch-config
Starts incsearch.vim with your custom configuration. See help docs for more detail.
:h incsearch-config-converters
function! s:noregexp(pattern) abort
return '\V' . escape(a:pattern, '\')
endfunction
function! s:config() abort
return {'converters': [function('s:noregexp')]}
endfunction
noremap <silent><expr> z/ incsearch#go(<SID>config())
incsearch.vim x fuzzy https://github.com/haya14busa/incsearch-fuzzy.vim
:h incsearch-config-modules
incsearch.vim x fuzzy x vim-easymotion https://github.com/haya14busa/incsearch-easymotion.vim
haya14busa (https://github.com/haya14busa)
osyo-manga(https://github.com/osyo-manga), the author of the custom command line library, https://github.com/osyo-manga/vital-over, which incsearch.vim heavily depends on.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。