nvim: dismiss search highlight with <esc> instead of <leader>h
This commit is contained in:
parent
c0dea465da
commit
ca89048a67
1 changed files with 3 additions and 3 deletions
|
@ -41,6 +41,9 @@ M.setup = function()
|
||||||
map("n", "<c-h>", "<c-w>h")
|
map("n", "<c-h>", "<c-w>h")
|
||||||
map("n", "<c-l>", "<c-w>l")
|
map("n", "<c-l>", "<c-w>l")
|
||||||
|
|
||||||
|
-- disable highlight until next search
|
||||||
|
map("n", "<esc>", "<cmd>nohlsearch<cr>")
|
||||||
|
|
||||||
local window = require("fschauen.window")
|
local window = require("fschauen.window")
|
||||||
|
|
||||||
-- window resizing
|
-- window resizing
|
||||||
|
@ -95,9 +98,6 @@ M.setup = function()
|
||||||
map("n", "<leader>dh", diagnostic.hide, { desc = ui.Diagnostic.." [d]iagnostic [h]ide" })
|
map("n", "<leader>dh", diagnostic.hide, { desc = ui.Diagnostic.." [d]iagnostic [h]ide" })
|
||||||
map("n", "<leader>ds", diagnostic.select_virtual_text_severity, { desc = ui.Diagnostic.." [d]iagnostic [s]everity" })
|
map("n", "<leader>ds", diagnostic.select_virtual_text_severity, { desc = ui.Diagnostic.." [d]iagnostic [s]everity" })
|
||||||
|
|
||||||
-- disable highlight until next search
|
|
||||||
map("n", "<leader>h", "<cmd>nohlsearch<cr><esc>")
|
|
||||||
|
|
||||||
-- navigate items in quickfix and location lists
|
-- navigate items in quickfix and location lists
|
||||||
map("n", "<leader>j", "<cmd>cnext<cr>zz")
|
map("n", "<leader>j", "<cmd>cnext<cr>zz")
|
||||||
map("n", "<leader>k", "<cmd>cprevious<cr>zz")
|
map("n", "<leader>k", "<cmd>cprevious<cr>zz")
|
||||||
|
|
Loading…
Add table
Reference in a new issue