Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,6 @@ do
-- [[ Basic Keymaps ]]
-- See `:help vim.keymap.set()`

-- Clear highlights on search when pressing <Esc> in normal mode
-- See `:help hlsearch`
vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>')

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm could go either way on removing this, but I just didn't think it made sense to have two mappings cover the same thing


-- Diagnostic Config & Keymaps
-- See `:help vim.diagnostic.Opts`
vim.diagnostic.config {
Expand Down Expand Up @@ -240,6 +236,18 @@ do
-- vim.keymap.set("n", "<C-S-j>", "<C-w>J", { desc = "Move window to the lower" })
-- vim.keymap.set("n", "<C-S-k>", "<C-w>K", { desc = "Move window to the upper" })

-- Since we are using CTRL-L for window navigation, add default CTRL-L functionality to CTRL-C
-- See `:help CTRL-L-default`
vim.keymap.set(
'n',
'<C-c>',
'<Cmd>nohlsearch'
.. '<Bar>diffupdate'
.. '<Bar>call nvim_buf_clear_namespace(0, nvim_create_namespace("nvim.multicursor"), 0, -1)'
.. '<Bar>normal! <C-L><C-c><CR>',
{ desc = 'Clear pending command and search highlighting, update diffs, remove multicursors' }
)
Comment on lines +241 to +249

@nathanzeng nathanzeng Nov 30, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is not friendly enough, I could see if we could get an upstream feature for a <Plug> mapping for CTRL-L behavior


-- [[ Basic Autocommands ]]
-- See `:help lua-guide-autocommands`

Expand Down