1.5.1 • Published 4 months ago

coc-pairs v1.5.1

Weekly downloads
1,886
License
MIT
Repository
github
Last release
4 months ago

coc-pairs

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().

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

1.4.4

4 months ago

1.4.3

4 months ago

1.5.1

4 months ago

1.5.0

4 months ago

1.4.2

2 years ago

1.4.1

3 years ago

1.4.0

3 years ago

1.3.2

3 years ago

1.3.1

4 years ago

1.3.0

4 years ago

1.2.23

4 years ago

1.2.22

4 years ago

1.2.21

5 years ago

1.2.20

6 years ago

1.2.19

6 years ago

1.2.18

6 years ago

1.2.17

6 years ago

1.2.16

6 years ago

1.2.15

6 years ago

1.2.14

6 years ago

1.2.13

6 years ago

1.2.12

6 years ago

1.2.11

6 years ago

1.2.10

6 years ago

1.2.9

6 years ago

1.2.8

6 years ago

1.2.7

6 years ago

1.2.6

6 years ago

1.2.5

6 years ago

1.2.4

6 years ago

1.2.3

6 years ago

1.2.2

6 years ago

1.2.1

6 years ago

1.2.0

6 years ago

1.1.0

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

7 years ago

1.0.0

7 years ago