diff --git a/core/options.vim b/core/options.vim index b097a6c..07bb6a0 100644 --- a/core/options.vim +++ b/core/options.vim @@ -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 diff --git a/core/plugins.vim b/core/plugins.vim index f4d2fa3..18e4147 100644 --- a/core/plugins.vim +++ b/core/plugins.vim @@ -63,21 +63,14 @@ onoremap F :call sneak#wrap(v:operator, 2, 1, 1, 1) " or previous match let g:sneak#s_next = 1 -"""""""""""""""""""""""""""""vim-anzu settings""""""""""""""""""""""" -nmap n (anzu-n-with-echo)zzzv -nmap N (anzu-N-with-echo)zzzv +""""""""""""""""""""""""""""" settings for nvim-hlslens""""""""""""""" +noremap n execute('normal! ' . v:count1 . 'nzzzv') + \lua require('hlslens').start() +noremap N execute('normal! ' . v:count1 . 'Nzzzv') + \lua require('hlslens').start() -" 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 * (asterisk-z*) -nmap # (asterisk-z#) -xmap * (asterisk-z*) -xmap # (asterisk-z#) +map * (asterisk-z*)lua require('hlslens').start() +map # (asterisk-z#)lua require('hlslens').start() """""""""""""""""""""""""""""LeaderF settings""""""""""""""""""""" " Do not use cache file diff --git a/lua/plugins.lua b/lua/plugins.lua index ca7c8ad..64d3d06 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -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")