nvim: better behavior for remove highlights from hlsearch

now it just does `noh` instead of `set hlsearch!`
This commit is contained in:
PowerUser64 2021-10-20 01:31:45 -07:00
parent 866986c46c
commit 8c94182d19
2 changed files with 3 additions and 15 deletions

View file

@ -20,7 +20,7 @@ vim.cmd [[
set wrap
set linebreak
" set guicursor= " always use the block cursor
syntax on
syntax enable
set redrawtime=1000 " max syntax highlight time
set number "relativenumber
"autocmd InsertEnter * :set norelativenumber " Automatically toggle line numbers
@ -75,10 +75,10 @@ vim.cmd [[
command! WQA wqa
" Press Alt h to toggle highlighting on/off, and show current value.
noremap <M-h> <cmd>set hlsearch! hlsearch?<CR>
nnoremap <M-h> <cmd>noh<CR>
" Toggle spell check with alt S
noremap <M-S> <cmd>set spell! spell?<CR>
nnoremap <M-S> <cmd>set spell! spell?<CR>
" find + replace with alt S
nnoremap <M-s> <cmd>%s//g<Left><Left>