Closed ymzuiku closed 1 year ago
You can set them by list.normalMappings
and list.insertMappings
.
Thanks @fannheyward , but it's no work.
My ~/.vim/coc-settings.json
:
{
"list.insertMappings": {
"<C-n>": "do:next",
"<C-p>": "do:previous"
},
"list.normalMappings": {
"<C-n>": "do:next",
"<C-p>": "do:previous"
}
}
or:
{
"list.insertMappings": {
"<C-n>": "normal:j",
"<C-p>": "normal:k",
},
"list.normalMappings": {
"<C-n>": "normal:j",
"<C-p>": "normal:k",
}
}
Check :h coc-list-mappings-custom
.
@fannheyward Thanks, It's work:
"list.insertMappings": {
"<C-n>": "feedkeys:\\<Down>",
"<C-p>": "feedkeys:\\<Up>"
},
"list.normalMappings": {
"<C-n>": "feedkeys:\\<Down>",
"<C-p>": "feedkeys:\\<Up>"
}
"list.insertMappings": {
"<C-n>": "do:next",
"<C-p>": "do:previous"
}
works on nvim, but not vim.
Fixed on coc.nvim.
This is a novice question. In coc-lists, ctrl+j and ctrl+k is very simple change list, but in coc suggestions use ctrl+n and ctrl+p, how can i set it same keymap?