vim-autocite


Ⅰ. 插件描述

Autocomplete bibtex citation tags in Vim

Ⅱ. 基本信息

创建日期:  2014-11-02
使用用户:  1
Github星:  2
插件作者:  GCBallesteros

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'gcballesteros/vim-autocite'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'gcballesteros/vim-autocite'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'gcballesteros/vim-autocite'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/gcballesteros/vim-autocite

Ⅳ. 文档说明

# vim-autocite

Introduction

After deciding to move from LaTex to to Asciidoc
for my document writing I found myself without the quasimagical auto completion
of citations from vim-latex.

Autocite extracts that functionality from vim-latex and makes
it easily accesible for other file extensions.

Currently it only works for .txt documents with the Asciidoc-bib
convention for citations.

Pathogen Installation

cd ~/.vim/bundle
git clone git://github.com/gcballesteros/vim-autocite

Usage

Bibliography (*.bib) files are searched for by default in the
directory where the document being edited is stored. Bibliography files can also be included by adding to the
document commented lines such as:

// bibtexfile:/full/path/to/my/bibliography/my_bib.bib

Once vim-autocite is capable of finding your bibliography
files you only have to start writing your citation with
the Asciidoc-bib
conventions:

[cite:]
[citenp:]

after the colon write some clue and <Control-X><Control-O> to
trigger the autocompletion menu. A clue may be the last name of
an author, part of the title or bibtex label for the article.

Configuration

vim-autocite defines two global variables:

  • Enable/Disable the search of bibfiles in the directory of the edited file
    (default: 1)

    let g:autocite_search_in_dir=1
  • Enable/Disable the search of bibfiles specified inside the document
    with bibtexfile: (default: 1)

    let g:autocite_search_in_doc=1

Feature Request

If you would like vim-autocite to work on other filetypes or citation labels ask for it.

Acknowledgements

The core of the script has been scavenged from vim-latex so vim-autocite
wouldn't be possible without Karl Yngve Lervag.

Any bugs have been introduced by me, please let me know if it doesn't work as expected.

Dependencies

Vim-autocite requires that bibtex is installed.

添加新评论