Git Product home page Git Product logo

coc-pairs's Introduction

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 paris work like in VSCode.

Tips

  • You should disable/remove other auto pair plugin for this extension work as expected.
  • When you type paired character which is just next character, it would just move to right by one column.
  • When the previous content ends with two of inserting character, the character would just inserted without insert paired character, this makes insert triple quotes easier.
  • ' only pairs when character before is not word character.
  • for < to insert paired >, the previous character should not be empty space.

Install

In your vim/neovim, run command:

:CocInstall coc-pairs

Features

  • Insert pair character automatically.
  • Buffer local pairs, ex: autocmd FileType tex let b:coc_paires = [["$", "$"]]

Options

  • pairs.disableLanguages, list of language ids to disable this extension, default: [].
  • pairs.enableCharacters, list of enabled characters, default: ["(", "[", "{", "<", "'", "\"", "`"].
  • pairs.enableBackspace, enable imap for backspce to remove paired characters, default: true, won't work when <bs> already mapped.

To disable characters for specified filetype, you can use b:coc_pairs_disabled, ex:

autocmd FileType markdown let b:coc_pairs_disabled = ['`']

License

MIT

coc-pairs's People

Contributors

atomdmac avatar chemzqm avatar escorponox avatar iron-e avatar liubang avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.