rddunphy / vim-fzf-bibtex

MIT License
0 stars 0 forks source link

Vim-fzf-bibtex

Commands for using fzf-bibtex in Vim.

Installation and setup

Install using your package manager - e.g. for vim-plug, add Plug 'rddunphy/vim-fzf-bibtex' to your .vimrc.

Requirements:

Specify the a directory to use for the cache, and a colon-separated list of bibtex source files:

let $FZF_BIBTEX_CACHEDIR = 'path/to/cache/dir'
let $FZF_BIBTEX_SOURCES = 'paths/to/bibtex/files'

If $FZF_BIBTEX_CACHEDIR is not specified, it defaults to %APPDATA%\fzf-bibtex on Windows, or $HOME/.cache/fzf-bibtex elsewhere.

Commands

Each command has a version with with the postfix Insert (e.g. :FzfBibtexInsert), which returns to insert mode after inserting the citations.

Appending an explamation mark to any command will open Fzf fullscreen.

Default mappings

By default, the following normal mode mappings are provided for LaTeX files:

Corresponding insert mode mappings start with <C-Z>:

For other file types, mappings are defined for markdown summaries and for Pandoc citation keys:

Corresponding insert mode mappings start with <C-Z>:

To specify custom mappings, set 'g:fzf_bibtex_use_default_mappings' to 0.