Changes

Jump to navigation Jump to search
92 bytes added ,  06:57, 31 July 2023
m
httphttps://www.vim.org/
This page is about editing ConTeXt source in Vim, gVim, MacVim, and other Vim clones.
The recommended way to typeset a ConTeXt document is to use the <tt>:ConTeXt</tt> command. Just type:
:ConTeXt%
to compile the document in the current buffer.
Typesetting happens in the background,
def ConTeXtCustomCommand(path: string): list<string>
return ['mtxrun', '--script', 'context', '--nonstopmode', path]
enddef
Vim searches for the magic line in the first ten lines of the current buffer:
if it the magic line is found, the document specified by that line is typeset rather than the
one in the current buffer. The root document does not have to be opened in
Vim.
The last command will create the following syntax files:
- * <tt>context-data-context.vim</tt>;- * <tt>context-data-interfaces.vim</tt>;- * <tt>context-data-metafun.vim</tt>;- * <tt>context-data-tex.vim</tt>.
=== Editing features ===
imap <F8> <ESC>:exe "lcd" fnameescape(expand("%:p:h"))<CR>:make test<CR>
nmap <F8> :exe "lcd" fnameescape(expand("%:p:h"))<CR>:make test<CR>
 
Note that if you use <tt>:make</tt> typesetting will happen synchronously.
== Other useful Vim plugins ==

Navigation menu