mini.pick: choose_in_split mapping not working as expected #2115
-
Contributing guidelines
Module(s)mini.pick QuestionI customize the keybinding for choosing a file in a horizontal split with the following in init.lua: require('mini.pick').setup({
mappings = {
choose_in_split = '<C-i>'
}
})Sometimes this works as I expect, but more often, it opens the file in the preview window, not a new split buffer. If I keep pressing It always works correctly if I erase the above and just use the standard Am I missing something with the configuration? If not, can you please suggest how I can debug further? I've looked over the documentation, but can't see anything I'm doing wrong. I've also ensured that I haven't (purposely at least) setup the Other mini modules I'm using, in addition to mini.deps: require('mini.diff').setup()
require('mini.extra').setup()
require('mini.files').setup()
require('mini.icons').setup()
require('mini.indentscope').setup()
require('mini.sessions').setup()
require('mini.snippets').setup()
require('mini.starter').setup()
require('mini.surround').setup()
require('mini.trailspace').setup()
require('mini.visits').setup() |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
The The reason this sometimes works is because actions are not guaranteed to be preferred in any order. Sometimes The solution is to make |
Beta Was this translation helpful? Give feedback.
The
<C-i>and<Tab>is usually interpreted by the terminal emulator as the same key (see this, for example). So in this case this setup is the same aschoose_in_split = '<Tab>', which makes it conflict with the defaulttoggle_previewaction (which is also<Tab>).The reason this sometimes works is because actions are not guaranteed to be preferred in any order. Sometimes
<Tab>acts aschoose_in_splitand sometimes astoggle_preview.The solution is to make
toggle_previewbe different fromchoose_in_split, i.e. use different key for eitherchoose_in_splitortoggle_preview.