You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to override the vertical split mapping so that it would open the file in a vertical split right away rather than waiting for the user to manually close vifm.
I achieved this with some hacky config:
localfunctionmappings()
-- make ctrl-v close the file manager and open the file in a split pane. The default behaviour is to only-- open the split pane once the flie manager has been closed manually by the user.vim.api.nvim_buf_set_keymap(
0,
"t",
"<c-v>",
'<C-\\><C-n>:lua require("fm-nvim").setMethod("vsplit | edit")<CR>il<cr>',
{ silent=true }
)
endfm_nvim.setup({
on_open= {
mappings,
},
mappings= {
-- something that I'm unlikely to press so that it is effectively disabled (these mappings are set after on_open-- so it would override the <c-v> defined in mappings if we didn't set it)vert_split="sirerofpuwyq-;ufwyq-;pufyqw-;pufyqw-;",
},
})
This works, but it's a bit messy. Providing an empty string to, or omitting, the vert_spiltmappings map entry causes it to error or default to <c-v> and because the default mappings are set up after on_open it would override my override.
Adding an override was my use case, but it would also be nice to disable mappings that users have no intention to use as they may conflict with other mappings, and generally create unnecessary noise.
The text was updated successfully, but these errors were encountered:
I tried to override the vertical split mapping so that it would open the file in a vertical split right away rather than waiting for the user to manually close vifm.
I achieved this with some hacky config:
This works, but it's a bit messy. Providing an empty string to, or omitting, the
vert_spilt
mappings
map entry causes it to error or default to<c-v>
and because the default mappings are set up afteron_open
it would override my override.Adding an override was my use case, but it would also be nice to disable mappings that users have no intention to use as they may conflict with other mappings, and generally create unnecessary noise.
The text was updated successfully, but these errors were encountered: