https://github.com/neoclide/coc-pairs
Basic auto pairs extension of coc.nvim
https://github.com/neoclide/coc-pairs
auto-pairs coc neovim pairs vim
Last synced: 5 months ago
JSON representation
Basic auto pairs extension of coc.nvim
- Host: GitHub
- URL: https://github.com/neoclide/coc-pairs
- Owner: neoclide
- Created: 2019-01-09T07:58:04.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2025-05-02T13:36:52.000Z (6 months ago)
- Last Synced: 2025-05-02T14:57:50.173Z (6 months ago)
- Topics: auto-pairs, coc, neovim, pairs, vim
- Language: TypeScript
- Homepage:
- Size: 89.8 KB
- Stars: 298
- Watchers: 6
- Forks: 15
- Open Issues: 5
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# coc-pairs
Auto pair extension for [coc.nvim](https://github.com/neoclide/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 `` experience, checkout `:h coc#on_enter()`.
## Tips
- You should disable/remove other auto pair plugins for this extension work as expected.
- When you type a paired character which is just the next character, it would just move to the right by one column.
- When the previous content ends with two inserting characters, the characters would just be inserted without inserting the paired character. This makes inserting triple quotes easier.
- `'` only pairs when the character before is not a word character.
- for `<` to insert paired `>`, the previous character should not be an empty space.## Install
In vim/neovim, run this command:
```
:CocInstall coc-pairs
```## Features
- Insert pair characters automatically.
- Buffer local pairs, ex: `autocmd FileType tex let b:coc_pairs = [["$", "$"]]`## Options
- `pairs.disableLanguages`: A list of languages IDs to disable this extension on Default: `[]`
- `pairs.disableBuftypes`: A list of buftypes to disable this extension on Default: `[]`
- `pairs.enableCharacters`: Enabled character list for keymap. Default: `["(","[","{","<","'","\"","`","【","「","《","『"]`
- `pairs.requireEOLCharacters`: Characters should be only paired at end of line. Default: `[]`
- `pairs.alwaysPairCharacters`: Characters that should be paired without check for next character. Default: `[]`
- `pairs.enableBackspace`: Remap your backspce to delete paired characters when necessary, won't work when already mapped. Default: `true`To disable characters for a specified filetypes, you can use `b:coc_pairs_disabled`, ex:
autocmd FileType markdown let b:coc_pairs_disabled = ['`']
## License
MIT