Professional Documents
Culture Documents
FT Context
FT Context
==============================================================================
CONTENTS *context.vim* *ft-context*
1. Introduction |ft-context-intro|
2. Commands |ft-context-commands|
3. Settings |ft-context-settings|
4. Mappings |ft-context-mappings|
==============================================================================
*ft-context-intro*
Introduction ~
For more fine grained control over the command and its environment,
`context.Typeset()` can be used directly (or `context#Typeset()` from legacy
Vim script). For instance, if a version of ConTeXt is installed in
`~/context`, you may define a function to use it similar to the following:
>
import autoload 'context.vim'
def MyConTeXt()
const env = {'PATH':
printf("%s/context/tex/texmf-<os>-<arch>/bin:%s", $HOME, $PATH)}
context.Typeset("%", env)
enddef
- `context-data-context.vim`;
- `context-data-interfaces.vim`;
- `context-data-metafun.vim`;
- `context-data-tex.vim`.
*ft-context-commands*
Commands ~
*:ConTeXt*
Start a background |job| to typeset the document in the current buffer. The
command accepts an optional buffer's name, if you want to typeset a document
that is in a different buffer.
*:ConTeXtLog*
Edit the log file corresponding to the source in the current buffer.
*:ConTeXtJobsStatus*
Echo the number of jobs currently running in the background.
*:ConTeXtStopJobs*
Stop all the ConTeXt jobs currently running in the background.
*ft-context-settings*
Settings ~
*'b:context_ignore_makefile'*
*'g:context_ignore_makefile'*
|:make| can be used to (synchronously) typeset a document. If a Makefile exists
and this option is not set, standard `make` is used. If this option is set,
`mtxrun` is invoked instead, even if a Makefile exists.
>
g:context_ignore_makefile = 0
<
NOTE: before using |:make|, set the working directory of the buffer to the
directory of the file to be typeset.
*'g:context_extra_options'*
A list of additional options to pass to `mtxrun`.
>
g:context_extra_options = []
<
*'b:context_include'*
*'g:context_include'*
Dictionary of filetype/GROUP pairs for which syntax highlighting should be
activated between \startGROUP and \stopGROUP. The default is to highlight XML
between `\startXML` and `\stopXML`.
>
g:context_include = {'xml': 'XML'}
NOTE: Lua and MetaPost are always highlighted within the respective blocks.
*'g:no_context_maps'*
When set, do not define any mappings.
>
g:no_context_maps = 0
<
*ft-context-mappings*
Mappings ~
vim:tw=78:sw=4:ts=8:noet:ft=help:norl: