瀏覽代碼

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 年之前
父節點
當前提交
2fcb64ac56
共有 1 個文件被更改,包括 1 次插入1 次删除
  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" },