Skip to content
Coc autocompletion and list source for .bib files
TypeScript JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.gitignore
.npmignore
Readme.md
package.json
tsconfig.json
tslint.json
webpack.config.js
yarn.lock

Readme.md

coc-bibtex

This Coc extension adds a BibTeX source to CocList. You can access it by running :CocList bibtex in (Neo)Vim. You can also use it as an autocompletion source for BibTeX entries.

Installation

Run :CocInstall coc-bibtex to install.

Configuration

Set list.source.bibtex.files to an array containing your .bib files. For instance, in coc-settings.json:

{
// 
  "list": {
    "source": {
      "bibtex": {
        "files": [
          "~/my-library.bib"
        ]
      }
    }
  }
// 
}

Or in vimrc:

call coc#config('list.source.bibtex', {
  \  'files': [
  \    '~/my-library.bib'
  \  ]
  \})

Using with LaTeX

The default configuration for the list source is to insert pandoc-style citations ([@cite-key]). If you would like to use this extension with LaTeX, add the following configuration:

In coc-settings.json:

{
//...

"list": {
  "source": {
	"bibtex": {
		"citation": {
			"before": "\cite{",
			"after": "\}"
		}
	}
  }
}
//...
}

Or in vimrc:

call coc#config('list.source.bibtex.citation', {
    \ 'before': '\cite{',
	\ 'after': '}'
    \ })

Todo

  • Add the ability to pass a .bib file as an argument to the list call
  • Color
You can’t perform that action at this time.