Auto pair extension for coc.nvim.
Note you can use other vim auto pairs plugins with coc.nvim, it's a simplified implementation to make auto pairs work like in VSCode.
Note b:coc_paires
have renamed to b:coc_pairs
For enhanced <CR>
experience, checkout :h coc#on_enter()
.
'
only pairs when the character before is not a word character.<
to insert paired >
, the previous character should not be an empty space.In vim/neovim, run this command:
:CocInstall coc-pairs
autocmd FileType tex let b:coc_pairs = [["$", "$"]]
pairs.disableLanguages
, list of language ids to disable this extension, default: []
.pairs.enableCharacters
, list of enabled characters, default: ["(", "[", "{", "<", "'", "\"", "`"]
.pairs.enableBackspace
, enable imap for backspace to remove paired characters,true
, won't work when <bs>
is already mapped.To disable characters for a specified filetypes, you can use b:coc_pairs_disabled
, ex:
autocmd FileType markdown let b:coc_pairs_disabled = ['`']
MIT