Sfoglia il codice sorgente

change no highlight behavior (#1285)

with `<cmd>let @/=""<CR>` its not possible to use `n`,`N` or stuff like `gcn` anymore because the last search is overwritten. With `:nohlsearch` this is not the case.
tuxflo 3 anni fa
parent
commit
2fcb64ac56
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      lua/core/which-key.lua

+ 1 - 1
lua/core/which-key.lua

@@ -68,7 +68,7 @@ M.config = function()
       ["c"] = { "<cmd>BufferClose!<CR>", "Close Buffer" },
       ["e"] = { "<cmd>lua require'core.nvimtree'.toggle_tree()<CR>", "Explorer" },
       ["f"] = { "<cmd>Telescope find_files<CR>", "Find File" },
-      ["h"] = { '<cmd>let @/=""<CR>', "No Highlight" },
+      ["h"] = { '<cmd>nohlsearch', "No Highlight" },
       b = {
         name = "Buffers",
         j = { "<cmd>BufferPick<cr>", "jump to buffer" },