Giter VIP home page Giter VIP logo

ycmtex's Introduction

LaTeX Completer for YouCompleteMe

The YCM VIM plugin allows integration of other completers. So for example for C++ or other languages. This completer adds support for the LaTeX programming language. It uses directly the completer API of YCM and thereby supports all the features which the plugin itself provides.

Supported Completions

Currently the completer has support for the following commands:

  1. References to other LaTeX objects via '\ref' and '\refv'. Therefore all '.tex' files in the current directory are scanned and all defined labels are gathered. For each label additional information such as the actual caption of the object and its type ('chapter', 'figure', etc.) are collected and later shown in the completion menu.

  2. Citations of other work via '\cite', '\citep', and '\citev'. Therefore again all '.tex' files in the current directory are scanned for the definition of the Bibtex-database files. These files are then scanned too and all entries are extracted. These entries will be presented in the completion menu together with additional information such as the authors, title, and the type of the Bibtex-entry ('book', 'article', etc.).

Installation

tbd.

Limitations and Future Work

  1. The completer currently only supports Bibtex databases for citation completion. Support for other formats should be added in the future.

  2. The additional information collection for referable objects is kind of hacky. It uses heavy string manipulation to find the information. A proper LaTeX parser may be appropriate here. Though, this might be an overkill for this purpose.

  3. Support for other LaTeX commands like abbreviations and glossary entries can be added in the future to make this completer more attractive. This might need a refactoring of the current design.

  4. The completer currently only finds '.tex' files which are located in the same directory as the one which is edited at the moment. It may be interesting to also parse '\input' and '\include' commands and thereby somehow circumvent this problem. Or one could search also in parent and subdirectories and use the commands to build dependencies between the files and then only parse those files which are correlated to the current one.

  5. In the current version the completer parses all files it finds again if it is executed. This can be quite intensive if there a many '.tex' files. Hence, some kind of buffer could be used here. However changes to other files must be detected which can become tricky.

  6. At the moment the plugin only provides a completer. However I could also imagine a "GoToDefinition" functionality similar to the one of C++-completers. For this functionality the buffer mentioned in 5. would be really handy.

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.