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 have this keymap that switches to the alternate file
vim.keymap.set('n', '', function()
local keys = vim.api.nvim_replace_termcodes('<C-^>', true, false, true)
vim.api.nvim_feedkeys(keys, 'n', false)
end, { noremap = true, desc = 'Switch to alternative file' })
Activity
[-]how map qa to exit nvim in oil buffer ?[/-][+]how to map qa to exit nvim in oil buffer ?[/+]rionnwastaken commentedon Feb 10, 2026
:help oil-config
I have this keymap that switches to the alternate file
vim.keymap.set('n', '', function()
local keys = vim.api.nvim_replace_termcodes('<C-^>', true, false, true)
vim.api.nvim_feedkeys(keys, 'n', false)
end, { noremap = true, desc = 'Switch to alternative file' })
yal212 commentedon Jul 13, 2026
You can add a buffer-local keymap for Oil buffers: