1
0
mirror of https://github.com/jdhao/nvim-config.git synced 2025-06-08 14:14:33 +02:00

Use nvim-hlslens instead of vim-anzu

This commit is contained in:
jdhao 2021-08-18 23:21:51 +08:00
parent 72bf99a15f
commit 30774cac5b
3 changed files with 14 additions and 16 deletions

View File

@ -111,6 +111,11 @@ set undofile
" Do not show "match xx of xx" and other messages during auto-completion
set shortmess+=c
" Do not show search match count on bottom right (seriously, I would strain my
" neck looking at it). Using plugins like vim-anzu or nvim-hlslens is a better
" choice, IMHO.
set shortmess+=S
" Completion behaviour
" set completeopt+=noinsert " Auto select the first completion entry
set completeopt+=menuone " Show menu even if there is only one item

View File

@ -63,21 +63,14 @@ onoremap <silent> F :call sneak#wrap(v:operator, 2, 1, 1, 1)<CR>
" or previous match
let g:sneak#s_next = 1
"""""""""""""""""""""""""""""vim-anzu settings"""""""""""""""""""""""
nmap n <Plug>(anzu-n-with-echo)zzzv
nmap N <Plug>(anzu-N-with-echo)zzzv
""""""""""""""""""""""""""""" settings for nvim-hlslens"""""""""""""""
noremap <silent> n <Cmd>execute('normal! ' . v:count1 . 'nzzzv')<CR>
\<Cmd>lua require('hlslens').start()<CR>
noremap <silent> N <Cmd>execute('normal! ' . v:count1 . 'Nzzzv')<CR>
\<Cmd>lua require('hlslens').start()<CR>
" Maximum number of words to search
let g:anzu_search_limit = 500000
" Message to show for search pattern
let g:anzu_status_format = '/%p [%i/%l]'
"""""""""""""""""""""""""""""vim-asterisk settings"""""""""""""""""""""
nmap * <Plug>(asterisk-z*)
nmap # <Plug>(asterisk-z#)
xmap * <Plug>(asterisk-z*)
xmap # <Plug>(asterisk-z#)
map * <Plug>(asterisk-z*)<Cmd>lua require('hlslens').start()<CR>
map # <Plug>(asterisk-z#)<Cmd>lua require('hlslens').start()<CR>
"""""""""""""""""""""""""""""LeaderF settings"""""""""""""""""""""
" Do not use cache file

View File

@ -64,8 +64,8 @@ require("packer").startup({
-- Show current search term in different color
use("PeterRincker/vim-searchlight")
-- Show match number for incsearch
use("osyo-manga/vim-anzu")
-- Show match number for search
use("kevinhwang91/nvim-hlslens")
-- Stay after pressing * and search selected text
use("haya14busa/vim-asterisk")