{"id":13442434,"url":"https://github.com/lervag/vimtex","last_synced_at":"2026-03-14T10:33:51.826Z","repository":{"id":37773745,"uuid":"13344397","full_name":"lervag/vimtex","owner":"lervag","description":"VimTeX: A modern Vim and neovim filetype plugin for LaTeX files.","archived":false,"fork":false,"pushed_at":"2025-05-07T21:24:35.000Z","size":12373,"stargazers_count":5809,"open_issues_count":19,"forks_count":400,"subscribers_count":36,"default_branch":"master","last_synced_at":"2025-05-07T22:28:25.755Z","etag":null,"topics":["filetype-plugin","latex","neovim","tex","vim","vim-plugin","vimtex"],"latest_commit_sha":null,"homepage":"","language":"TeX","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lervag.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2013-10-05T11:55:11.000Z","updated_at":"2025-05-07T21:48:32.000Z","dependencies_parsed_at":"2023-09-28T11:00:06.034Z","dependency_job_id":"fed177f4-7277-410b-95ab-192d3f1d4305","html_url":"https://github.com/lervag/vimtex","commit_stats":{"total_commits":4774,"total_committers":204,"mean_commits":"23.401960784313726","dds":"0.14914118139924593","last_synced_commit":"539a203f19531c6b9d2d1b093ee8911fb7050bbc"},"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lervag%2Fvimtex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lervag%2Fvimtex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lervag%2Fvimtex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lervag%2Fvimtex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lervag","download_url":"https://codeload.github.com/lervag/vimtex/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253843611,"owners_count":21972936,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["filetype-plugin","latex","neovim","tex","vim","vim-plugin","vimtex"],"created_at":"2024-07-31T03:01:45.670Z","updated_at":"2025-12-16T22:20:51.699Z","avatar_url":"https://github.com/lervag.png","language":"TeX","readme":"# VimTeX\n\nVimTeX is a modern [Vim](http://www.vim.org/) and [Neovim](https://neovim.io/)\nfiletype and syntax plugin for LaTeX files.\n\n[![Gitter](https://badges.gitter.im/vimtex-chat/community.svg)](https://gitter.im/vimtex-chat/community?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge)\n![CI tests](https://github.com/lervag/vimtex/workflows/CI%20tests/badge.svg)\n[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=5N4MFVXN7U8NW)\n\n## Table of contents\n\n\u003c!-- START doctoc generated TOC please keep comment here to allow auto update --\u003e\n\u003c!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --\u003e\n\n\n- [Requirements](#requirements)\n- [Installation](#installation)\n- [Configuration](#configuration)\n- [Quick Start](#quick-start)\n  - [Tutorial](#tutorial)\n  - [Documentation](#documentation)\n- [Screenshots](#screenshots)\n  - [GIFs](#gifs)\n- [Features](#features)\n- [Other relevant plugins](#other-relevant-plugins)\n  - [Linting and syntax checking](#linting-and-syntax-checking)\n  - [Snippets and templates](#snippets-and-templates)\n  - [Tag navigation](#tag-navigation)\n- [Alternatives](#alternatives)\n\n\u003c!-- END doctoc generated TOC please keep comment here to allow auto update --\u003e\n\n## Requirements\n\nVimTeX requires Vim version 9.1 or Neovim version 0.10. The requirements\nwere updated in January 2025 after the release of VimTeX 2.16. If you are stuck\non older versions of Vim or Neovim, then you should not use the most recent\nversion of VimTeX, but instead remain at the v2.15 tag (or older).\n\nSome features require external tools. For example, the default compiler backend\nrelies on [latexmk](https://www.cantab.net/users/johncollins/latexmk/index.html).\nUsers are encouraged to read the requirements section in the\n[documentation](doc/vimtex.txt) (`:h vimtex-requirements`).\n\n## Installation\n\nThere are a lot of methods for installing plugins.\nThe following explains the most common and popular approaches.\n\n\u003e [!WARNING]\n\u003e\n\u003e Many plugin managers provide mechanisms to lazy load plugins. Please don't\n\u003e use this for VimTeX! VimTeX is already lazy loaded by virtue of being\n\u003e a filetype plugin and by using the autoload mechanisms. There is therefore\n\u003e nothing to gain by forcing VimTeX to lazily load through the plugin manager.\n\u003e In fact, doing it will _break_ the inverse-search mechanism, which relies on\n\u003e a _global_ command (`:VimtexInverseSearch`).\n\n### lazy.nvim\n\nIn Neovim, [lazy.nvim](https://github.com/folke/lazy.nvim) is probably the most popular plugin manager.\nTo install VimTeX, add a plugin spec similar to this:\n\n```lua\n{\n  \"lervag/vimtex\",\n  lazy = false,     -- we don't want to lazy load VimTeX\n  -- tag = \"v2.15\", -- uncomment to pin to a specific release\n  init = function()\n    -- VimTeX configuration goes here, e.g.\n    vim.g.vimtex_view_method = \"zathura\"\n  end\n}\n```\n\nVimTeX is mostly implemented with Vimscript and is configured with the\nclassical vimscript variable convention like `g:vimtex_OPTION_NAME`. Nowadays,\nNeovim is often configured with Lua, thus some users may be interested in\nreading `:help lua-vimscript`.\n\n### vim-plug\n\nIf you use [vim-plug](https://github.com/junegunn/vim-plug), then add *one* of the following lines to your configuration.\nThe first will use the latest versions from the `master` branch, whereas the second will pin to a release tag.\n\n```vim\nPlug 'lervag/vimtex'\nPlug 'lervag/vimtex', { 'tag': 'v2.15' }\n```\n\n### Other\n\nThere are many other plugin managers out there.\nThey are typically well documented, and it should be straightforward to extrapolate the above snippets.\n\n\u003e [!NOTE]\n\u003e\n\u003e If you use the built-in package feature, then:\n\u003e\n\u003e - Make sure to read and understand the package feature: `:help package`!\n\u003e - Use the `/pack/foo/start` subdirectory to make sure the filetype plugin is\n\u003e   automatically loaded for the `tex` filetypes.\n\u003e - Helptags are not generated automatically. Run `:helptags` to generate them.\n\u003e - Please note that by default Vim puts custom `/start/` plugin directories at\n\u003e   the end of the `\u0026runtimepath`. This means the built in filetype plugin is\n\u003e   loaded, which prevents VimTeX from loading. See\n\u003e   [#1413](https://github.com/lervag/vimtex/issues/1413) for two suggested\n\u003e   solutions to this. To see which scripts are loaded and in which order, use\n\u003e   `:scriptnames`.\n\u003e - For more information on how to use the Vim native package solution, see\n\u003e   [here](https://vi.stackexchange.com/questions/9522/what-is-the-vim8-package-feature-and-how-should-i-use-it)\n\u003e   and [here](https://shapeshed.com/vim-packages/).\n\n## Configuration\n\nAfter installing VimTeX, you should edit your `.vimrc` file or `init.vim` file\nto configure VimTeX to your liking. Users should read the documentation to\nlearn the various configuration possibilities, but the below is a simple\noverview of some of the main aspects.\n\n\u003e [!CAUTION]\n\u003e\n\u003e **PLEASE** don't just copy this without reading the comments!\n\n```vim\n\" This is necessary for VimTeX to load properly. The \"indent\" is optional.\n\" Note: Most plugin managers will do this automatically!\nfiletype plugin indent on\n\n\" This enables Vim's and neovim's syntax-related features. Without this, some\n\" VimTeX features will not work (see \":help vimtex-requirements\" for more\n\" info).\n\" Note: Most plugin managers will do this automatically!\nsyntax enable\n\n\" Viewer options: One may configure the viewer either by specifying a built-in\n\" viewer method:\nlet g:vimtex_view_method = 'zathura'\n\n\" Or with a generic interface:\nlet g:vimtex_view_general_viewer = 'okular'\nlet g:vimtex_view_general_options = '--unique file:@pdf\\#src:@line@tex'\n\n\" VimTeX uses latexmk as the default compiler backend. If you use it, which is\n\" strongly recommended, you probably don't need to configure anything. If you\n\" want another compiler backend, you can change it as follows. The list of\n\" supported backends and further explanation is provided in the documentation,\n\" see \":help vimtex-compiler\".\nlet g:vimtex_compiler_method = 'latexrun'\n\n\" Most VimTeX mappings rely on localleader and this can be changed with the\n\" following line. The default is usually fine and is the symbol \"\\\".\nlet maplocalleader = \",\"\n```\n\n## Quick Start\n\nThe following video shows how to use VimTeX's main features (credits:\n[@DustyTopology](https://github.com/DustyTopology) from\n[#1946](https://github.com/lervag/vimtex/issues/1946#issuecomment-846345095)).\nThe example LaTeX file used in the video is available under\n[`test/example-quick-start/main.tex`](test/example-quick-start/main.tex) and it\nmay be instructive to copy the file and play with it to learn some of these\nbasic functions.\n\nhttps://user-images.githubusercontent.com/66584581/119213849-1b7d4080-ba77-11eb-8a31-7ff7b9a4a020.mp4\n\n\u003e [!TIP]\n\u003e\n\u003e If the compiler or the viewer doesn't start properly, one may type\n\u003e `\u003clocalleader\u003eli` to view the system commands that were executed to start\n\u003e them. To inspect the compiler output, use `\u003clocalleader\u003elo`.\n\n### Tutorial\n\nBoth new and experienced users are encouraged to read the excellent guide by\n@ejmastnak: [Getting started with the VimTeX plugin](https://ejmastnak.com/tutorials/vim-latex/vimtex/).\nThe guide covers all the fundamentals of setting up a VimTeX-based LaTeX\nworkflow, including usage of the VimTeX plugin, compilation, setting up forward\nand inverse search with a PDF reader, and Vimscript tools for user-specific\ncustomization.\n\n### Documentation\n\nUsers are of course _strongly_ encouraged to read the documentation, at least\nthe introduction, to learn about the different features and possibilities\nprovided by VimTeX (see [`:h vimtex`](doc/vimtex.txt)). Advanced users and\npotential developers may also be interested in reading the supplementary\ndocuments:\n\n* [CONTRIBUTING.md](CONTRIBUTING.md)\n* [DOCUMENTATION.md](DOCUMENTATION.md)\n\n## Screenshots\n\nHere is an example of the syntax highlighting provided by VimTeX. The conceal\nfeature is active on the right-hand side split. The example is made by\n@DustyTopology with the\n[vim-colors-xcode](https://github.com/arzg/vim-colors-xcode) colorscheme with\nsome minor adjustments [described\nhere](https://github.com/lervag/vimtex/issues/1946#issuecomment-843674951).\n\n![Syntax example](https://github.com/lervag/vimtex-media/blob/main/img/syntax.png)\n\n### GIFs\n\nSee the file [VISUALS.md](VISUALS.md) for screencast-style GIFs demonstrating\nVimTeX's core motions, text-editing commands, and text objects.\n\n## Features\n\nBelow is a list of features offered by VimTeX. The features are accessible as\nboth commands and mappings. The mappings generally start with `\u003clocalleader\u003el`,\nbut if desired one can disable default mappings to define custom mappings. \nNearly all features are enabled by default, but each feature may be disabled if\ndesired. The two exceptions are code folding and formating, which are disabled\nby default and must be manually enabled.\n\n- Document compilation with\n  [latexmk](https://www.cantab.net/users/johncollins/latexmk/index.html),\n  [latexrun](https://github.com/aclements/latexrun),\n  [tectonic](https://tectonic-typesetting.github.io), or\n  [arara](https://github.com/cereda/arara)\n- LaTeX log parsing for quickfix entries using\n  - internal method\n  - [pplatex](https://github.com/stefanhepp/pplatex)\n- Compilation of selected part of document\n- Support for several PDF viewers with forward search\n  - [MuPDF](http://www.mupdf.com/)\n  - [Okular](https://okular.kde.org/)\n  - [qpdfview](https://launchpad.net/qpdfview)\n  - [Skim](http://skim-app.sourceforge.net/)\n  - [SumatraPDF](http://www.sumatrapdfreader.org/free-pdf-reader.html)\n  - [TeXShop](https://pages.uoregon.edu/koch/texshop/)\n  - [Zathura](https://pwmt.org/projects/zathura/)\n  - Other viewers are supported through a general interface\n- Completion of\n  - citations\n  - labels\n  - commands\n  - file names for figures, input/include, includepdf, includestandalone\n  - glossary entries\n  - package and documentclass names based on available `.sty` and `.cls` files\n- Document navigation through\n  - table of contents\n  - table of labels\n  - proper settings for `'include'`, `'includeexpr'`, `'suffixesadd'` and\n    `'define'`, which among other things\n    - allow `:h include-search` and `:h definition-search`\n    - give enhanced `gf` command\n- Easy access to (online) documentation of packages\n- Word count (through `texcount`)\n- Motions ([link to GIF demonstrations](VISUALS.md#motion-commands))\n  - Move between section boundaries with `[[`, `[]`, `][`, and `]]`\n  - Move between environment boundaries with `[m`, `[M`, `]m`, and `]M`\n  - Move between math environment boundaries with `[n`, `[N`, `]n`, and `]N`\n  - Move between frame environment boundaries with `[r`, `[R`, `]r`, and `]R`\n  - Move between comment boundaries with `[*` and `]*`\n  - Move between matching delimiters with `%`\n- Text objects ([link to GIF demonstrations](VISUALS.md#text-objects))\n  - `ic ac` Commands\n  - `id ad` Delimiters\n  - `ie ae` LaTeX environments\n  - `i$ a$` Math environments\n  - `iP aP` Sections\n  - `im am` Items\n- Other mappings ([link to GIF demonstrations](VISUALS.md#deleting-surrounding-latex-content))\n  - Delete the surrounding command, environment or delimiter with\n    `dsc`/`dse`/`ds$`/`dsd`\n  - Change the surrounding command, environment or delimiter with\n    `csc`/`cse`/`cs$`/`csd`\n  - Toggle between complementary environments with `tse` (see [v2.16 release notes](https://github.com/lervag/vimtex/releases/tag/v2.16))\n  - Toggle starred command or environment with `tsc`/`tss`\n  - Toggle inline and displaymath with `ts$`\n  - Toggle between e.g. `()` and `\\left(\\right)` with `tsd`\n  - Toggle (inline) fractions with `tsf`\n  - Toggle line-break macro `\\\\` with `tsb`\n  - Close the current environment/delimiter in insert mode with `]]`\n  - Add `\\left ... \\right)` modifiers to surrounding delimiters with `\u003cF8\u003e`\n  - Insert new command with `\u003cF7\u003e`\n  - Convenient insert mode mappings for faster typing of e.g. maths\n  - Context menu on citations (e.g. `\\cite{...}`) mapped to `\u003ccr\u003e`\n- Improved folding (`:h 'foldexpr'`)\n- Improved indentation (`:h 'indentexpr'`)\n- Syntax highlighting\n  - A consistent core syntax specification\n  - General syntax highlighting for several popular LaTeX packages\n  - Nested syntax highlighting for several popular LaTeX packages\n  - Highlight matching delimiters\n- Support for multi-file project packages\n  - [import](http://ctan.uib.no/macros/latex/contrib/import/import.pdf)\n  - [subfiles](http://ctan.uib.no/macros/latex/contrib/subfiles/subfiles.pdf)\n\nSee the documentation for a thorough introduction to VimTeX (e.g. `:h vimtex`).\n\n## Other relevant plugins\n\nEven though VimTeX provides a lot of nice features for working with LaTeX\ndocuments, there are several features that are better served by other,\ndedicated plugins. For a more detailed listing of these, please see [`:help\nvimtex-and-friends`](doc/vimtex.txt#L540).\n\n### Linting and syntax checking\n\n  * [ale](https://github.com/w0rp/ale)\n  * [neomake](https://github.com/neomake/neomake)\n  * [syntastic](https://github.com/vim-syntastic/syntastic)\n\n### Snippets and templates\n\n  * [UltiSnips](https://github.com/SirVer/ultisnips)\n  * [neosnippet](https://github.com/Shougo/neosnippet.vim)\n\n### Tag navigation\n\n  * [vim-gutentags](https://github.com/ludovicchabant/vim-gutentags)\n\n## Alternatives\n\nThe following are some alternative LaTeX plugins for Vim:\n\n* [LaTeX-Suite](http://vim-latex.sourceforge.net)\n\n    The main difference between VimTeX and LaTeX-Suite (aka vim-latex) is\n    probably that VimTeX does not try to implement a full fledged IDE for LaTeX\n    inside Vim. E.g.:\n\n    * VimTeX does not provide a full snippet feature, because this is better\n      handled by [UltiSnips](https://github.com/SirVer/ultisnips) or\n      [neosnippet](https://github.com/Shougo/neosnippet.vim) or similar snippet\n      engines.\n    * VimTeX builds upon Vim principles: It provides text objects for\n      environments, inline math, it provides motions for sections and\n      paragraphs\n    * VimTeX uses `latexmk`, `latexrun`, `tectonic` or `arara` for compilation\n      with a callback feature to get instant feedback on compilation errors\n    * VimTeX is very modular: if you don't like a feature, you can turn it off.\n\n* [TexMagic.nvim](https://github.com/jakewvincent/texmagic.nvim)\n\n    \"A simple, lightweight Neovim plugin that facilitates LaTeX build engine\n    selection via magic comments. It is designed with the TexLab LSP server's\n    build functionality in mind, which at the time of this plugin's inception\n    had to be specified in init.lua/init.vim and could not be set on\n    a by-project basis.\"\n\n    This plugin should be combined with the TexLab LSP server, and it only\n    works on neovim.\n\n* [LaTeX-Box](https://github.com/LaTeX-Box-Team/LaTeX-Box)\n\n    VimTeX currently has most of the features of LaTeX-Box, as well as\n    some additional ones. See [here](#features) for a relatively complete list\n    of features.\n\n    One particular feature that LaTeX-Box has but VimTeX misses, is the ability\n    to do single-shot compilation _with callback_. This functionality was\n    removed because it adds a lot of complexity for relatively little gain\n    (IMHO).\n\n* [AutomaticTexPlugin](http://atp-vim.sourceforge.net)\n* [vim-latex-live-preview](https://github.com/xuhdev/vim-latex-live-preview)\n\nFor more alternatives and more information and discussions regarding LaTeX\nplugins for Vim, see:\n\n* [What are the differences between LaTeX plugins](http://vi.stackexchange.com/questions/2047/what-are-the-differences-between-latex-plugins)\n* [List of LaTeX editors (not only Vim)](https://tex.stackexchange.com/questions/339/latex-editors-ides)\n\n","funding_links":["https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=5N4MFVXN7U8NW"],"categories":["Tutorial","TeX","Editors","plugins for writing"],"sub_categories":["Windows Manager","General purpose text editors"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flervag%2Fvimtex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flervag%2Fvimtex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flervag%2Fvimtex/lists"}