Giter VIP home page Giter VIP logo

vimtex's Introduction

vimtex

vimtex is a Vim plugin that provides support for writing LaTeX documents. It is based on LaTeX-Box and it shares a similar goal: to provide a simple and lightweight LaTeX plugin. It has been rewritten from scratch to provide a more modern and modular code base. See here for some more comments on the difference between vimtex and other LaTeX plugins for Vim.

Build Status

Features

Below is a list of features offered by vimtex. The features are accessible as both commands and mappings. The mappings generally start with <localleader>l, but if desired one can disable default mappings to define custom mappings. All features are enabled by default, but each feature may be disabled if desired.

  • Document compilation with latexmk
  • Support for several PDF viewers with forward search
  • Completion of citations, labels, and file names for figures
  • Document navigation through
    • table of content
    • table of labels
  • Word count (through texcount)
  • Motions
    • Move between sections with [[, [], ][, ]]
    • Move between matching delimiters with %
  • Text objects
    • ic ac Commands
    • id ad Delimiters
    • ie ae LaTeX environments
    • i$ a$ Inline math structures
  • Other mappings
    • Delete the surrounding command or environment with dsc/dse/ds$
    • Change the surrounding command or environment with csc/cse/cs$
    • Toggle starred environment with tse
    • Toggle between e.g. () and \left(\right) with tsd
    • Close the current environment/delimiter in insert mode with ]]
    • Insert new command with <F7>
    • Convenient insert mode mappings for faster typing of e.g. maths
  • Improved folding (:h 'foldexpr')
  • Improved indentation (:h 'indentexpr')
  • Improved syntax highlighting
    • Highlight matching delimiters
    • Support for biblatex/natbib package
    • Support for cleveref package
    • Support for listings package
    • Support for minted package
    • Support for dot2tex with nested syntax highlighting
  • Support for multi-file project packages

See the documentation for a thorough introduction to vimtex (e.g. :h vimtex).

Installation

If you use vim-plug, then add the following line to your vimrc file:

Plug 'lervag/vimtex'

Or use some other plugin manager:

Alternatives

The following are some alternative LaTeX plugins for Vim:

  • LaTeX-Box

    vimtex currently has most of the features of LaTeX-Box, as well as some additional ones. See here for a relatively complete list of features.

    One particular feature that LaTeX-Box has but vimtex misses, is the ability to do single-shot compilation with callback. This functionality was removed because it adds a lot of complexity for relatively little gain (IMHO).

  • LaTeX-Suite

    The main difference between vimtex and LaTeX-Suite (aka vim-latex) is probably that vimtex does not try to implement a full fledged IDE for LaTeX inside Vim. E.g.:

    • vimtex does not provide a full snippet feature, because this is better handled by UltiSnips or neosnippet or similar snippet engines.
    • vimtex builds upon Vim principles: It provides text objects for environments, inline math, it provides motions for sections and paragraphs
    • vimtex uses latexmk for compilation with a callback feature to get instant feedback on compilation errors
    • vimtex is very modular: if you don't like a feature, you can turn it off.
  • AutomaticTexPlugin

  • vim-latex-live-preview

For more alternatives and more information and discussions regarding LaTeX plugins for Vim, see:

License

The MIT license (MIT)

Copyright (c) 2016 Karl Yngve Lervåg

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

vimtex's People

Contributors

lervag avatar konfekt avatar micbou avatar mbrunnen avatar camilstaps avatar manu-mannattil avatar karlmoritz avatar frankier avatar d125q avatar leomao avatar jipolanco avatar salviati6 avatar nvander1 avatar elafarge avatar simichaels avatar thor avatar tbrosnan avatar tokoro10g avatar victoriv avatar ajouellette avatar nasenatmer avatar zegervdv avatar nigorojr avatar wmvanvliet avatar namiravi avatar leszekswirski avatar johnrichardrinehart avatar lahwaacz avatar hexchain avatar nhooyr avatar

Watchers

James Cloos avatar  avatar

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.