latex-support


Ⅰ. 插件描述

Edit LaTeX documents in Vim/gVim/Neovim. Insert commands, run the typesetter and BibTeX and look up help.

Ⅱ. 基本信息

创建日期:  2016-01-06
使用用户:  3
Github星:  2
插件作者:  Wolfgang Mehner

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

Preface

This repository is mainly for the use with plug-in managers.

Have a look at the Screenshot Page.

The development happens in WolfgangMehner/vim-plugins.

Preview Version

This is a preview version!

Notable new features:

  • Call external tools via the command-line: :Latex, :LatexCheck,
    :LatexMakeindex, :LatexBibtex, :LatexView.
  • Change the typesetter during runtime using :LatexTypesetter.
  • Background processing, enable via :LatexProcessing.
  • View errors from background processing in quickfix using :LatexErrors.
  • Add maps for BibTeX buffers. The maps for the Comment, Text, and BibTeX
    templates now are available when editing BibTeX.

The background processing relies on the new +job feature, which becomes
available with a patch level of approx. 7.4.2000.

Please read the release notes below.


README for latex-support.vim (Version 2.0beta) / April 14 2019

  • INSTALLATION
  • RELEASE NOTES
  • FILES
  • ADDITIONAL TIPS
  • CREDITS

LaTeX Support implements an LaTeX-IDE for Vim/gVim/Neovim. It has been written
to considerably speed up writing code in a consistent style. This is done by
inserting complete statements, comments, idioms, and code snippets. There are
many additional hints and options which can improve speed and comfort when
writing LaTeX.
See the help file latexsupport.txt for more information.

This plug-in can be used with Vim version 7.3+ and Neovim 0.2.1+.


INSTALLATION

A system-wide installation for all users can also be done. This will have
further effects on how the plug-in works. For a step-by-step instruction, as
well as an explanation of the other consequences, please see the help file
doc/latexsupport.txt or look up the documentation via:

  :help latexsupport-system-wide

(1) LINUX

The subdirectories in the zip archive latex-support.zip mirror the directory
structure which is needed below the local installation directory $HOME/.vim/
(find the value of $HOME with :echo $HOME from inside Vim).

(1.0) Save the template files in $HOME/.vim/latex-support/templates/Templates
if you have changed any of them.

(1.1) Copy the zip archive latex-support.zip to $HOME/.vim and run

  unzip latex-support.zip

Afterwards, these files should exist:

  $HOME/.vim/autoload/mmtemplates/...
  $HOME/.vim/doc/...
  $HOME/.vim/plugin/latex-support.vim

(1.2) Loading of plug-in files must be enabled. If not use

  :filetype plugin on

This is the minimal content of the file $HOME/.vimrc. Create one if there
is none or use the files in $HOME/.vim/latex-support/rc as a starting point.

(1.3) Make the plug-in help accessible by typing the following command on the
Vim command line:

  :helptags $HOME/.vim/doc/

(1.4) Set at least some personal details. Use the map ntw inside a LaTeX buffer
or the menu entry:

  LaTeX -> Snippets -> template setup wizard

It will help you set up the file _runtimepath_/templates/personal.templates.
The file is read by all plug-ins supporting this feature to get your personal

  1. Here is the minimal personalization (my settings as an example):

    SetMacro( 'AUTHOR', 'Wolfgang Mehner' )
    SetMacro( 'AUTHORREF', 'wm' )
    SetMacro( 'EMAIL', 'wolfgang-mehner@web.de' )
    SetMacro( 'COPYRIGHT', 'Copyright (c) |YEAR|, |AUTHOR|' )

Use the file $HOME/.vim/templates/latex.templates to customize or add to
your LaTeX template library. It can also be set up via the wizard.

(Read more about the template system in the plug-in documentation)

(1.5) Consider additional settings in the file $HOME/.vimrc. The files
customization.vimrc and customization.gvimrc are replacements or
extensions for your .vimrc and .gvimrc. You may want to use parts of

  1. The files are documented.

(2) WINDOWS

The subdirectories in the zip archive latex-support.zip mirror the directory
structure which is needed below the local installation directory $HOME/vimfiles/
(find the value of $HOME with :echo $HOME from inside Vim).

(2.0) Save the template files in $HOME/vimfiles/latex-support/templates/Templates
if you have changed any of them.

(2.1) Copy the zip archive latex-support.zip to $HOME/vimfiles and run

  unzip latex-support.zip

Afterwards, these files should exist:

  $HOME/vimfiles/autoload/mmtemplates/...
  $HOME/vimfiles/doc/...
  $HOME/vimfiles/plugin/latex-support.vim

(2.2) Loading of plug-in files must be enabled. If not use

  :filetype plugin on

This is the minimal content of the file $HOME/_vimrc. Create one if there
is none or use the files in $HOME/vimfiles/latex-support/rc as a starting point.

(2.3) Make the plug-in help accessible by typing the following command on the
Vim command line:

  :helptags $HOME\vimfiles\doc\

(2.4) Set at least some personal details. Use the map ntw inside a LaTeX buffer
or the menu entry:

  LaTeX -> Snippets -> template setup wizard

It will help you set up the file _runtimepath_/templates/personal.templates.
The file is read by all plug-ins supporting this feature to get your personal

  1. Here is the minimal personalization (my settings as an example):

    SetMacro( 'AUTHOR', 'Wolfgang Mehner' )
    SetMacro( 'AUTHORREF', 'wm' )
    SetMacro( 'EMAIL', 'wolfgang-mehner@web.de' )
    SetMacro( 'COPYRIGHT', 'Copyright (c) |YEAR|, |AUTHOR|' )

Use the file $HOME/vimfiles/templates/latex.templates to customize or add to
your LaTeX template library. It can also be set up via the wizard.

(Read more about the template system in the plug-in documentation)

(2.5) Consider additional settings in the file $HOME/_vimrc. The files
customization.vimrc and customization.gvimrc are replacements or
extensions for your _vimrc and _gvimrc. You may want to use parts of

  1. The files are documented.

(3) ADDITIONAL REMARKS

There are a lot of features and options which can be used and influenced:

  • use of template files and macros
  • using and managing personal code snippets
  • using additional plug-ins

Actions differ for different modes. Please read the documentation:

  :help latexsupport 

Any problems? See the TROUBLESHOOTING section at the end of the help file
doc/latexsupport.txt.


RELEASE NOTES

RELEASE NOTES FOR VERSION 2.0beta

  • Adapt for running under Neovim more smoothly.
  • Add commands :Latex, :LatexCheck, :LatexMakeindex, and :LatexBibtex to run the
    external commands.
  • Add command :LatexMakeglossaries to run makeglossaries.
  • Add command :LatexView to start external viewers.
  • Add command :LatexConvert to convert documents.
  • Add command :LatexMainDoc to set the document for typesetting, viewing, ...
  • Add command :LatexTypesetter to change the typesetter during runtime.
  • Add command :LatexProcessing to change between foreground and background
    processing.
  • Add command :LatexErrors and map ´re to view errors from background processing
    in quickfix.
  • BibTeX errors are recognized by quickfix.
  • Add a conversion 'eps-pdf'.
  • The templates which are inserted into new files as file skeletons can be
    specified in the templates library, via the property:
    Latex::FileSkeleton::Script
  • Add configuration variables g:Latex_Ctrl_j and g:Latex_Ctrl_d to control
    the creation of the CTRL+J and CTRL+D maps.
  • Remove g:Latex_CreateMenusDelayed, use g:Latex_LoadMenus instead.
  • Improve templates. (Includes the removal of some templates!)
  • Move the filetype plug-ins for tex and make to latex-support/rc.
  • Remove the definition of the maps CTRL+F9 and ALT+F9. Add them to your
    filetype plug-ins if you want to use them.
  • Minor bugfixes.

Note: The filetype plug-ins have been moved, and are thus not loaded
automatically anymore. Copy them from latex-support/rc to ftplugin,
or add the commands there to your own filetype plug-ins.

RELEASE NOTES FOR OLDER VERSIONS

-> see file latex-support/doc/ChangeLog


FILES

README.md
                    This file.

autoload/mmtemplates/*
                    The template system.
autoload/mmtoolbox/*
                    The toolbox (make, ...).

doc/latexsupport.txt
                    The help file for LaTeX support. 
doc/templatesupport.txt
                    The help file for the template system.
doc/toolbox*.txt
                    The help files for the toolbox.

plugin/latex-support.vim
                    The LaTeX plug-in for Vim/gVim/Neovim.

latex-support/codesnippets/*
                    Some LaTeX code snippets as a starting point.

latex-support/templates/Templates
                    LaTeX main template file.
latex-support/templates/*.templates
                    Several dependent template files.

The following files and extensions are for convenience only.
latex-support.vim will work without them.
The settings are explained in the files themselves.

ftdetect/template.vim
ftplugin/template.vim
syntax/template.vim
                    Additional files for working with templates.

latex-support/doc/latex-hotkeys.pdf 
                    Hotkey reference card.
latex-support/doc/ChangeLog
                    The change log.

latex-support/rc/customization.ctags
                    Additional settings for use in .ctags to enable
                    navigation in LaTeX documents with the plug-in
                    taglist.vim.
latex-support/rc/customization.gvimrc
                    Additional settings for use in .gvimrc:
                      hot keys, mouse settings, fonts, ...
                    The file is commented. Append it to your .gvimrc if you
                    like.
latex-support/rc/customization.vimrc
                    Additional settings for use in .vimrc:
                      incremental search, tabstop, hot keys,
                      font, use of dictionaries, ...
                    The file is commented. Append it to your .vimrc if you
                    like.

latex-support/rc/make.vim
                    Define maps for make(1) in makefiles.
latex-support/rc/tex.vim
                    Suggestion for a filetype plugin:
                      defines additional maps, expands keyword characters
                      for better support of labels

latex-support/rc/*.templates
                    Sample template files for customization. Used by the
                    template setup wizard.

CREDITS

We thank:

  • Fritz Mehner for developed this plug-in and maintained it until 2015.

添加新评论