Repository navigation
fix(keymaps): remap <C-L> functionality into <C-c> #2191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
nathanzeng
wants to merge
1
commit into
nvim-lua:master
Choose a base branch
from
nathanzeng:ctrl-c
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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>') | ||
|
|
||
| -- Diagnostic Config & Keymaps | ||
| -- See `:help vim.diagnostic.Opts` | ||
| vim.diagnostic.config { | ||
|
|
@@ -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
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
|
|
||
| -- [[ Basic Autocommands ]] | ||
| -- See `:help lua-guide-autocommands` | ||
|
|
||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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