Skip to content
Discussion options

You must be logged in to vote

The best way to disable a single mapping is to create a new mapping for that specific <plug> mapping, e.g. something like this:

imap <buffer> <sid>]] <plug>(vimtex-delim-close)

or in Lua:

vim.keymap.set("i", "<sid>]]", "<plug>(vimtex-delim-close)", { buffer = true })

I would add this to your personal ftplugin/tex.vim or ftplugin/tex.lua file, if you have one. If not, then you need to add this to a filetype autocommand so that it only executes on the tex filetype.

Minor explanation: <sid> is a special code that you can use in mappings that expand to a special key code <snr> and a number for that particular script file. Thus, we are now creating a mapping that is extremely unlikely that you…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@JBlocklove
Comment options

@lervag
Comment options

Answer selected by JBlocklove
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants