deoplete-latex


Ⅰ. 插件描述

An experimental deoplete source for LaTeX completion

Ⅱ. 基本信息

创建日期:  2017-02-03
使用用户:  7
Github星:  12
插件作者:  poppyschmo

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

deoplete-latex

Update.
vimtex has been offering command completion for some time now. Please use that instead. Thanks.

Warning.
This is not a serious deoplete source. It's merely a "dumb list" of LaTeX
commands thrown together ad hoc to assist the infrequent user or LaTeX novice.
To be clear, there's no syntax analysis happening here, no "intellisense"
engine humming in the background. (See Poor performance
below.)

screenshot

Features (or lack thereof)

  • delegates to vimtex for all completion capabilities offered by the
    plugin (like \cite{}, \ref{}, etc.), meaning vimtex must be loaded for

these to appear

  • completion offerings are LaTeX only; no ConTeXt, Texinfo, etc.
  • packages listed in TeXstudio's completion repo are included as default
    sources; currently, these are not extensible, (you can't add your own local

.cwl header files), though this could change

  • key/value args and other command options noted in TeXstudio's cwl spec
    tend to work as expected
  • all preview-window doc strings were removed in favor simple signatures; see
    vim-latexrefman for a full docs-integration option
  • in-menu Unicode symbols for relevant commands
  • package contents loaded on save; previous attempts at dynamic loading have
    been abandoned, for now

Global options

" Include macros like `\jhat` from MathJax and KaTeX.
let g:deoplete#sources#latex#include_web_math = 1  " default 0

" Include a hodgepodge of miscellaneous commands and environments.
let g:deoplete#sources#latex#include_misc = 1      " default 0

Issues

There are far too many niggling issues to list here (and likely some major
unknown unknowns, as well). Most can safely be attributed to the author's
overall lack of computer knowhow.

Poor performance

When editing documents longer than a few pages, especially ones dependent on
more than a few packages, initial completion suggestions are truncated
(seemingly arbitrarily). This is accompanied by laggy cursor movement and
jittery scrolling. Things settle down after a minute or so, but this is
obviously a deal breaker for non-trivial work.

No context awareness re "environment"

Some commands are only supported in a given environment. These constraints
currently go unheeded.

Wrong "mode" context

Many commands are tagged with the wrong combination of text/math labels,
preventing them from showing up for completion in a given mode. Absent a
more precise and authoritative source for such data, this won't change.

Missing options

Much like the "mode" issue, most of these are attributable to incomplete or
erroneous source information, mainly because TeXstudio's cwl roster is
crowd-sourced and imperfect. Unless some facility for extensibility is
implemented here, this also won't change.

添加新评论