mapping: `<c-n>` and `<c-p>` navigation doesn't work if `]c` mapping already set
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
Research direction
Start in /plugin/ug.vim and inspect the and mappings, then reproduce the failure with an existing ]c mapping. Update the mappings so navigation does not recurse while preserving diff-mode and optional gitsigns behavior. Verify that both keys navigate hunks with and without the existing ]c mapping.
Written by the indexing model from the issue text.
Description
Afaict in /plugin/ug.vim, the <c-n> calling ]c recursively. With claude I have replaced them with
nmap <expr> <C-n> &diff
\ ? "\<Cmd>normal! ]c\<CR>]n"
\ : (luaeval('({pcall(require, "gitsigns")})[1]')
\ ? '<cmd>lua require("gitsigns").next_hunk({wrap=false})<cr>'
\ : ']n')
nmap <expr> <C-p> &diff
\ ? "\<Cmd>normal! [c\<CR>[n"
\ : (luaeval('({pcall(require, "gitsigns")})[1]')
\ ? '<cmd>lua require("gitsigns").prev_hunk({wrap=false})<cr>'
\ : '[n')
- Dominant language
- Lua
- Stars
- 14
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
api7/lua-resty-saml#62 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
nvim-tree/nvim-tree.lua#3357 · 1 comment ·
-
Difficulty 1/5 Under an hour Newbie friendliness 94/100
codymikol/multiverse.nvim#320 ·
-
Data Correction tbc
Difficulty 2/5 1-3 hours Newbie friendliness 68/100