abecodes/tabout.nvim

How to prevent keybind from being overwritten?

reDpz opened this issue · 1 comments

reDpz commented

Usually the plugin works just fine however when used in conjunction with some other plugins (e.g. vimwiki) it overwrites the tab key and the plugin won't work so long as I'm inside a vimwiki.

I'm using lazy and this is my plugin file

return{
	{
		'abecodes/tabout.nvim',
		lazy = false,
		config = function()
			require('tabout').setup {
				tabkey = '<Tab>', -- key to trigger tabout, set to an empty string to disable
				backwards_tabkey = '<S-Tab>', -- key to trigger backwards tabout, set to an empty string to disable
				act_as_tab = true, -- shift content if tab out is not possible
				act_as_shift_tab = false, -- reverse shift content if tab out is not possible (if your keyboard/terminal supports <S-Tab>)
				default_tab = '<C-t>', -- shift default action (only at the beginning of a line, otherwise <TAB> is used)
				default_shift_tab = '<C-d>', -- reverse shift default action,
				enable_backwards = true, -- well ...
				completion = true, -- if the tabkey is used in a completion pum
				tabouts = {
					{open = "'", close = "'"},
					{open = '"', close = '"'},
					{open = '`', close = '`'},
					{open = '(', close = ')'},
					{open = '[', close = ']'},
					{open = '{', close = '}'}
				},
				ignore_beginning = true, --[[ if the cursor is at the beginning of a filled element it will rather tab out than shift the content ]]
				exclude = {} -- tabout will ignore these filetypes
			}
		end,
		dependencies = {'nvim-treesitter', 'L3MON4D3/LuaSnip'}, -- or require if not used so far
		priority = 1000,
	},
}

Hi @reDpz 😊

That sounds like another plugin is overwriting the keybind.
You can check with :imap <TAB>...the output should show smth with <Plug>(Tabout).