mirror of
https://gitee.com/openharmony/third_party_jinja2
synced 2024-11-27 17:30:54 +00:00
Update integration docs for Vim syntax highlighting
This commit is contained in:
parent
fb7e12cce6
commit
287c4ac8b2
@ -81,21 +81,26 @@ snippet and add it into your `config/environment.py`::
|
|||||||
TextMate
|
TextMate
|
||||||
--------
|
--------
|
||||||
|
|
||||||
There is a `bundle for TextMate`_ that supports syntax highlighting for Jinja1 and Jinja2 for text based
|
There is a `bundle for TextMate`_ that supports syntax highlighting for Jinja1
|
||||||
templates as well as HTML. It also contains a few often used snippets.
|
and Jinja2 for text based templates as well as HTML. It also contains a few
|
||||||
|
often used snippets.
|
||||||
|
|
||||||
.. _bundle for TextMate: https://github.com/mitsuhiko/jinja2-tmbundle
|
.. _bundle for TextMate: https://github.com/mitsuhiko/jinja2-tmbundle
|
||||||
|
|
||||||
Vim
|
Vim
|
||||||
---
|
---
|
||||||
|
|
||||||
A syntax plugin for `Vim`_ exists in the Vim-scripts directory as well as the
|
A syntax plugin for `Vim`_ is available `from the jinja repository
|
||||||
`ext` folder at the root of the Jinja2 project. `The script
|
<https://github.com/pallets/jinja/blob/master/ext/Vim/jinja.vim>`_. The script
|
||||||
<http://www.vim.org/scripts/script.php?script_id=1856>`_ supports Jinja1 and
|
supports Jinja1 and Jinja2. Once installed, two file types are available
|
||||||
Jinja2. Once installed two file types are available `jinja` and `htmljinja`.
|
(``jinja`` and ``htmljinja``). The first one is for text-based templates and the
|
||||||
The first one for text based templates, the latter for HTML templates.
|
second is for HTML templates. For HTML documents, the plugin attempts to
|
||||||
|
automatically detect Jinja syntax inside of existing HTML documents.
|
||||||
|
|
||||||
Copy the files into your `syntax` folder.
|
If you are using a plugin manager like `Pathogen`_, see the `vim-jinja
|
||||||
|
<https://github.com/mitsuhiko/vim-jinja>`_ repository for installing in the
|
||||||
|
``bundle/`` directory.
|
||||||
|
|
||||||
.. _Babel: http://babel.pocoo.org/
|
.. _Babel: http://babel.pocoo.org/
|
||||||
.. _Vim: http://www.vim.org/
|
.. _Vim: http://www.vim.org/
|
||||||
|
.. _Pathogen: https://github.com/tpope/vim-pathogen
|
||||||
|
Loading…
Reference in New Issue
Block a user