From 8c94182d19950a3fc94bf40634ae3841a75d18a9 Mon Sep 17 00:00:00 2001 From: PowerUser64 Date: Wed, 20 Oct 2021 01:31:45 -0700 Subject: [PATCH] nvim: better behavior for remove highlights from hlsearch now it just does `noh` instead of `set hlsearch!` --- .config/nvim/lua/blake/lsp.lua | 12 ------------ .config/nvim/lua/blake/settings.lua | 6 +++--- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/.config/nvim/lua/blake/lsp.lua b/.config/nvim/lua/blake/lsp.lua index 4cb6c5c..cd41c61 100644 --- a/.config/nvim/lua/blake/lsp.lua +++ b/.config/nvim/lua/blake/lsp.lua @@ -81,18 +81,6 @@ M.treesitter = function() move = { enable = true, set_jumps = true, -- whether to set jumps in the jumplist - -- How to read these next keybinds - -- first character: - -- [ means previous - -- ] means next - -- second character: - -- m means function beginning - -- M means function end - -- OR - -- both the same means start in that direction - -- ex: [[ means previous start - -- both in opposite directions means end in that way - -- ex: [] means previous end goto_next_start = { [']m'] = '@function.outer', [']]'] = '@class.outer', diff --git a/.config/nvim/lua/blake/settings.lua b/.config/nvim/lua/blake/settings.lua index 3fabf2f..e0173dd 100644 --- a/.config/nvim/lua/blake/settings.lua +++ b/.config/nvim/lua/blake/settings.lua @@ -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 set hlsearch! hlsearch? + nnoremap noh " Toggle spell check with alt S - noremap set spell! spell? + nnoremap set spell! spell? " find + replace with alt S nnoremap %s//g