Skip to content

Commit

Permalink
Add a shortcut to force close the current buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
Shatur committed Jun 13, 2022
1 parent a767d00 commit f6908a1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions plugin/buffers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ vim.api.nvim_create_user_command('BDeleteOther', close_other_buffers, { desc = '

vim.keymap.set('', '<A-CR>', close_other_buffers, { noremap = true })
vim.keymap.set('', '<C-q>', close_buffer, { noremap = true })
vim.keymap.set('', '<Leader><C-q>', function()
close_buffer({ bang = true })
end, { noremap = true })
vim.keymap.set({ 'i', 't' }, '<C-q>', function()
vim.api.nvim_input('<Esc>')
close_buffer()
Expand Down

0 comments on commit f6908a1

Please sign in to comment.