diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-08-26 18:01:12 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-08-26 18:01:12 +0100 |
commit | 7dd543246a4c21c4d5a4242a28076706f5abebd4 (patch) | |
tree | 65ba994a881d011a9b0b77b4ae883048b590138f /runtime/doc | |
parent | 2ee347fbc0619179fefb9933e9bb1165463507b3 (diff) |
Update runtime files
Diffstat (limited to 'runtime/doc')
-rw-r--r-- | runtime/doc/Makefile | 4 | ||||
-rw-r--r-- | runtime/doc/ft_context.txt | 152 | ||||
-rw-r--r-- | runtime/doc/ft_mp.txt | 151 | ||||
-rw-r--r-- | runtime/doc/tags | 42 | ||||
-rw-r--r-- | runtime/doc/term.txt | 2 | ||||
-rw-r--r-- | runtime/doc/todo.txt | 6 | ||||
-rw-r--r-- | runtime/doc/various.txt | 3 |
7 files changed, 357 insertions, 3 deletions
diff --git a/runtime/doc/Makefile b/runtime/doc/Makefile index 2942e5dac5..7b8c6286ba 100644 --- a/runtime/doc/Makefile +++ b/runtime/doc/Makefile @@ -31,6 +31,8 @@ DOCS = \ filetype.txt \ fold.txt \ ft_ada.txt \ + ft_context.txt \ + ft_mp.txt \ ft_ps1.txt \ ft_raku.txt \ ft_rust.txt \ @@ -180,6 +182,8 @@ HTMLS = \ filetype.html \ fold.html \ ft_ada.html \ + ft_context.html \ + ft_mp.html \ ft_ps1.html \ ft_raku.html \ ft_rust.html \ diff --git a/runtime/doc/ft_context.txt b/runtime/doc/ft_context.txt new file mode 100644 index 0000000000..ba6bd0d819 --- /dev/null +++ b/runtime/doc/ft_context.txt @@ -0,0 +1,152 @@ +*ft_context.txt* For Vim version 9.0. Last change: 2022 Aug 12 + +This is the documentation for the ConTeXt filetype plugin. + +NOTE: the plugin requires +vim9script. + +============================================================================== +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 ~ + +ConTeXt, similarly to LaTeX, is a macro-based typesetting system built on TeX: +> + https://wiki.contextgarden.net + https://wiki.contextgarden.net/Vim +< +The ConTeXt plugin provides syntax highlighting, completion and support for +typesetting ConTeXt documents. The recommended way to typeset a document is to +use |:ConTeXt|. This will invoke the `mtxrun` script that is found in $PATH. + +For more fine grained control over the command and its environment, you may +invoke `context.Typeset()` directly (or `context#Typeset()` from legacy Vim +script). For instance, if you have installed a version of ConTeXt in +`~/context`, you may define a function to use it (you may put the following +code in `~/.vim/after/ftplugin/context.vim`) 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 +< +and perhaps use it with a mapping: +> + nnoremap <silent><buffer><leader>t <scriptcmd>MyConTeXt()<cr> +< +`context.Typeset()` accepts a third optional argument to specify a custom +typesetting command. Such argument must be a function that takes a path and +returns the command as a List. For example: +> + def ConTeXtCustomCommand(path: string): list<string> + return ['mtxrun', '--script', 'context', '--nonstopmode, path] + enddef + + context.ConTeXtTypeset("%", v:none, ConTeXtCustomCommand) +< +Large projects are often organized as a root document and various chapter +files. When editing a chapter file, it is convenient to invoke |:ConTeXt| +directly on it, rather than having to switch to the root file. A "magic line" +can be added at the beginning of each chapter file, which specifies the +relative path to the root file. For instance: +> + % !TEX root = ../MyRoot.tex +< +Vim searches for the magic line in the first ten lines of the current buffer: +if it 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. + +To extend completion and syntax highlighting, you may generate supporting +files using ConTeXt and add them to your configuration. If you configuration +resides in `~/.vim`, you may use these commands: +> + mkdir -p ~/.vim/syntax/shared + cd ~/.vim/syntax/shared + mtxrun --script interface --vim +< +The last command will create the following syntax files: + +- `context-data-context.vim`; +- `context-data-interfaces.vim`; +- `context-data-metafun.vim`; +- `context-data-tex.vim`. + +The same command can be used to update those syntax files. + + *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. + *'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 ~ + +tp "reflow TeX paragraph". + +i$ "inside inline math block". + +a$ "around inline math block". + +]] [count] start of sections forward. + +[[ [count] start of sections backward. + +][ [count] end sections forward. + +[] [count] end of sections backward. + +]} [count] end of blocks (\stop..., \setup..., + \define...) forward. + +[{ [count] begin of blocks (\start..., \setup..., + \define...) backward. + + vim:tw=78:sw=4:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/ft_mp.txt b/runtime/doc/ft_mp.txt new file mode 100644 index 0000000000..0c6646f19e --- /dev/null +++ b/runtime/doc/ft_mp.txt @@ -0,0 +1,151 @@ +*ft_mp.txt* For Vim version 9.0. Last change: 2022 Aug 12 + +This is the documentation for the METAFONT and MetaPost filetype plugins. +Unless otherwise specified, the commands, settings and mappings defined below +apply equally to both filetypes. + +NOTE: the plugin requires +vim9script. + +============================================================================== +CONTENTS *mp.vim* *ft-metapost* + *mf.vim* *ft-metafont* + +1. Introduction |ft-metapost-intro| +2. Commands |ft-metapost-commands| +3. Settings |ft-metapost-settings| +4. Mappings |ft-metapost-mappings| + +============================================================================== + *ft-metapost-intro* + *ft-metafont-intro* +Introduction ~ +This filetype plugin provides extensive support for editing METAFONT and +MetaPost documents, including syntax coloring, indentation, and completion. + +Defining indentation rules for METAFONT and MetaPost code is tricky and +somewhat subjective, because the syntax is quite liberal. The plugin uses some +heuristics that work well most of the time, but in particular cases you may +want to to override the automatic rules, so that the manually defined +indentation is preserved by commands like `gg=G`. + +This can be achieved by appending `%>`, `%<`, `%=` or `%!` to a line to +explicitly control the indentation of the next line. The `<` and `>` symbols +may be repeated many times: for instance, `%>>` will cause the next line to be +indented twice. Of course, `%<` means that the next line should be +de-indented; `%=` sets the indentation of the next line to be equal to the +indentation of the current line; and `%!` means that the indentation of the +next line should not change from whatever it has been manually set. + +For example, this is the default indentation of a simple macro: +> + def foo = + makepen( + subpath(T-n,t) of r + shifted .5down + --subpath(t,T) of r shifted .5up -- cycle + ) + withcolor black + enddef +< +By adding the special comments, the indentation can be adjusted arbitrarily: +> + def foo = + makepen( + subpath(T-n,t) of r %> + shifted .5down %> + --subpath(t,T) of r shifted .5up -- cycle %<<< + ) + withcolor black + enddef +< + *ft-metapost-commands* +Commands ~ + *:FixBeginfigs* +Renumber beginfig() blocks in the current buffer so that the n-th figure has +number n. MetaPost only. + + *ft-metapost-settings* + *ft-metafont-settings* +Settings ~ + *'g:mf_other_macros'* +Highlight some other basic macro names, e.g., from cmbase, logo, etc. This is +set to 1 by default in METAFONT buffers, and it is set to 0 by default in +MetaPost buffers. + + *'g:mf_plain_macros'* +Highlight keywords defined by plain.mf. This is set to 1 by default in +METAFONT buffers, and it is set to 0 by default in MetaPost buffers. + + *'g:mf_plain_modes'* +Highlight keywords defined by modes.mf. This is set to 1 by default in +METAFONT buffers, and it is set to 0 by default in MetaPost buffers. + + *'g:mp_close_tag'* +Define additional keywords that end indented blocks. For instance, if you +define: +> + g:mp_end_tag = ['\<endfoo\>'] +< +any line starting with `endfoo` will be de-indented compared to its previous +line. +> + g:mp_close_tag = [] +< + *'b:mp_metafun'* + *'g:mp_metafun'* +If set to 1, highlight ConTeXt's MetaFun keywords. MetaPost only. +> + g:mp_metafun = 0 +< + *'g:mp_mfplain_macros'* +Highlight keywords defined by mfplain.mp. MetaPost only. +> + g:mp_mfplain_macros = 1 +< + *'g:mp_open_tag'* +Define additional keywords that start indented blocks. For instance, if you +define: +> + g:mp_open_tag = ['\<beginfoo\>'] +< +the line following `beginfoo` will be indented. +> + g:mp_open_tag = [] +< + *'g:mp_other_macros'* +Highlight keywords defined by all base macro packages (boxes, rboxes, format, +graph, marith, sarith, string, TEX). This option affects only MetaPost +buffers. +> + g:mp_other_macros = 1 +< + *'g:mp_plain_macros'* +Highlight keywords defined by plain.mp. MetaPost only. +> + g:mp_plain_macros = 1 +< + *'g:no_mp_maps'* + *'g:no_mf_maps'* +When set, do not define any mapping in buffers with the corresponding +filetype. +> + g:no_mp_maps = 0 + g:no_mf_maps = 0 +< + *ft-metapost-mappings* + *ft-metafont-mappings* +Mappings ~ + +]] [count] vardefs, macros or figures forward. + +[[ [count] vardefs, macros or figures backward. + +][ [count] end of vardefs, macros or figures forward. + +[] [count] end of vardefs, macros or figures backward. + +]} [count] end of blocks (fi, endfor, endgroup) forward. + +[{ [count] begin of blocks (if, for, begingroup) backward. + + vim:tw=78:sw=4:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/tags b/runtime/doc/tags index 808bd5d94e..6d882af8d4 100644 --- a/runtime/doc/tags +++ b/runtime/doc/tags @@ -69,6 +69,9 @@ $quote eval.txt /*$quote* 'autowriteall' options.txt /*'autowriteall'* 'aw' options.txt /*'aw'* 'awa' options.txt /*'awa'* +'b:context_ignore_makefile' ft_context.txt /*'b:context_ignore_makefile'* +'b:context_include' ft_context.txt /*'b:context_include'* +'b:mp_metafun' ft_mp.txt /*'b:mp_metafun'* 'background' options.txt /*'background'* 'backspace' options.txt /*'backspace'* 'backup' options.txt /*'backup'* @@ -299,6 +302,20 @@ $quote eval.txt /*$quote* 'fs' options.txt /*'fs'* 'fsync' options.txt /*'fsync'* 'ft' options.txt /*'ft'* +'g:context_ignore_makefile' ft_context.txt /*'g:context_ignore_makefile'* +'g:context_include' ft_context.txt /*'g:context_include'* +'g:mf_other_macros' ft_mp.txt /*'g:mf_other_macros'* +'g:mf_plain_macros' ft_mp.txt /*'g:mf_plain_macros'* +'g:mf_plain_modes' ft_mp.txt /*'g:mf_plain_modes'* +'g:mp_close_tag' ft_mp.txt /*'g:mp_close_tag'* +'g:mp_metafun' ft_mp.txt /*'g:mp_metafun'* +'g:mp_mfplain_macros' ft_mp.txt /*'g:mp_mfplain_macros'* +'g:mp_open_tag' ft_mp.txt /*'g:mp_open_tag'* +'g:mp_other_macros' ft_mp.txt /*'g:mp_other_macros'* +'g:mp_plain_macros' ft_mp.txt /*'g:mp_plain_macros'* +'g:no_context_maps' ft_context.txt /*'g:no_context_maps'* +'g:no_mf_maps' ft_mp.txt /*'g:no_mf_maps'* +'g:no_mp_maps' ft_mp.txt /*'g:no_mp_maps'* 'gcr' options.txt /*'gcr'* 'gd' options.txt /*'gd'* 'gdefault' options.txt /*'gdefault'* @@ -1301,7 +1318,6 @@ $quote eval.txt /*$quote* +balloon_eval various.txt /*+balloon_eval* +balloon_eval_term various.txt /*+balloon_eval_term* +browse various.txt /*+browse* -+builtin_terms various.txt /*+builtin_terms* +byte_offset various.txt /*+byte_offset* +channel various.txt /*+channel* +cindent various.txt /*+cindent* @@ -2036,12 +2052,17 @@ $quote eval.txt /*$quote* :Cfilter quickfix.txt /*:Cfilter* :Clear terminal.txt /*:Clear* :CompilerSet usr_51.txt /*:CompilerSet* +:ConTeXt ft_context.txt /*:ConTeXt* +:ConTeXtJobsStatus ft_context.txt /*:ConTeXtJobsStatus* +:ConTeXtLog ft_context.txt /*:ConTeXtLog* +:ConTeXtStopJobs ft_context.txt /*:ConTeXtStopJobs* :Continue terminal.txt /*:Continue* :DiffOrig diff.txt /*:DiffOrig* :DoMatchParen pi_paren.txt /*:DoMatchParen* :Evaluate terminal.txt /*:Evaluate* :Explore pi_netrw.txt /*:Explore* :Finish terminal.txt /*:Finish* +:FixBeginfigs ft_mp.txt /*:FixBeginfigs* :GLVS pi_getscript.txt /*:GLVS* :Gdb terminal.txt /*:Gdb* :GetLatestVimScripts_dat pi_getscript.txt /*:GetLatestVimScripts_dat* @@ -6293,6 +6314,7 @@ conceal syntax.txt /*conceal* confirm() builtin.txt /*confirm()* connection-refused message.txt /*connection-refused* console-menus gui.txt /*console-menus* +context.vim ft_context.txt /*context.vim* control intro.txt /*control* conversion-server mbyte.txt /*conversion-server* convert-to-HTML syntax.txt /*convert-to-HTML* @@ -6937,6 +6959,11 @@ ft-clojure-indent indent.txt /*ft-clojure-indent* ft-clojure-syntax syntax.txt /*ft-clojure-syntax* ft-cobol-syntax syntax.txt /*ft-cobol-syntax* ft-coldfusion-syntax syntax.txt /*ft-coldfusion-syntax* +ft-context ft_context.txt /*ft-context* +ft-context-commands ft_context.txt /*ft-context-commands* +ft-context-intro ft_context.txt /*ft-context-intro* +ft-context-mappings ft_context.txt /*ft-context-mappings* +ft-context-settings ft_context.txt /*ft-context-settings* ft-cpp-syntax syntax.txt /*ft-cpp-syntax* ft-csh-syntax syntax.txt /*ft-csh-syntax* ft-css-omni insert.txt /*ft-css-omni* @@ -6996,6 +7023,15 @@ ft-markdown-syntax syntax.txt /*ft-markdown-syntax* ft-masm-syntax syntax.txt /*ft-masm-syntax* ft-mathematica-syntax syntax.txt /*ft-mathematica-syntax* ft-matlab-indent indent.txt /*ft-matlab-indent* +ft-metafont ft_mp.txt /*ft-metafont* +ft-metafont-intro ft_mp.txt /*ft-metafont-intro* +ft-metafont-mappings ft_mp.txt /*ft-metafont-mappings* +ft-metafont-settings ft_mp.txt /*ft-metafont-settings* +ft-metapost ft_mp.txt /*ft-metapost* +ft-metapost-commands ft_mp.txt /*ft-metapost-commands* +ft-metapost-intro ft_mp.txt /*ft-metapost-intro* +ft-metapost-mappings ft_mp.txt /*ft-metapost-mappings* +ft-metapost-settings ft_mp.txt /*ft-metapost-settings* ft-mma-syntax syntax.txt /*ft-mma-syntax* ft-moo-syntax syntax.txt /*ft-moo-syntax* ft-msql-syntax syntax.txt /*ft-msql-syntax* @@ -7074,6 +7110,8 @@ ft-yaml-syntax syntax.txt /*ft-yaml-syntax* ft-zimbu-plugin filetype.txt /*ft-zimbu-plugin* ft-zsh-syntax syntax.txt /*ft-zsh-syntax* ft_ada.txt ft_ada.txt /*ft_ada.txt* +ft_context.txt ft_context.txt /*ft_context.txt* +ft_mp.txt ft_mp.txt /*ft_mp.txt* ft_ps1.txt ft_ps1.txt /*ft_ps1.txt* ft_raku.txt ft_raku.txt /*ft_raku.txt* ft_rust.txt ft_rust.txt /*ft_rust.txt* @@ -8320,6 +8358,7 @@ message.txt message.txt /*message.txt* messages message.txt /*messages* meta intro.txt /*meta* method eval.txt /*method* +mf.vim ft_mp.txt /*mf.vim* min() builtin.txt /*min()* missing-options vi_diff.txt /*missing-options* mkdir() builtin.txt /*mkdir()* @@ -8353,6 +8392,7 @@ mouse_lnum-variable eval.txt /*mouse_lnum-variable* mouse_win-variable eval.txt /*mouse_win-variable* mouse_winid-variable eval.txt /*mouse_winid-variable* movement intro.txt /*movement* +mp.vim ft_mp.txt /*mp.vim* ms-dos os_msdos.txt /*ms-dos* msdos os_msdos.txt /*msdos* msql.vim syntax.txt /*msql.vim* diff --git a/runtime/doc/term.txt b/runtime/doc/term.txt index ae38366ff7..7acfba78c6 100644 --- a/runtime/doc/term.txt +++ b/runtime/doc/term.txt @@ -46,7 +46,7 @@ TERMCAP defined. A number of builtin terminals are available. Since patch 9.0.0280 there is no difference between Vim versions. You can see a list of available builtin terminals in the error message you get for `:set term=xxx` (when not running -the GUI). Also see |+builtin_terms|. +the GUI). Also see |++builtin_terms|. If the termcap code is included Vim will try to get the strings for the terminal you are using from the termcap file and the builtin termcaps. Both diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt index a4f3a288f7..ea8d2c0dba 100644 --- a/runtime/doc/todo.txt +++ b/runtime/doc/todo.txt @@ -38,6 +38,8 @@ browser use: https://github.com/vim/vim/issues/1234 *known-bugs* -------------------- Known bugs and current work ----------------------- +*.sil detection with FTsil() (lacygoill, Aug 25) + Further Vim9 improvements, possibly after launch: - Use Vim9 for more runtime files. - Check performance with callgrind and kcachegrind. @@ -182,6 +184,10 @@ Patches considered for including: - allow for nesting of timeout, sketch in #10595 - Add setcmdline() #10869 +Cleanup: +- Remove OLD_DIGRAPHS ? +- Remove FEAT_FOOTER ? + Add 'splitscroll' #10682 Useful? Any trouble? Null Chilly says it's OK. suggestion: names instead of numbers for the option value problem depending on whether window is focused or not diff --git a/runtime/doc/various.txt b/runtime/doc/various.txt index fd2dcf029a..ac8b4afcd0 100644 --- a/runtime/doc/various.txt +++ b/runtime/doc/various.txt @@ -374,7 +374,8 @@ N *+eval* expression evaluation |eval.txt| T *+ex_extra* always on now, used to be for Vim's extra Ex commands N *+extra_search* |'hlsearch'| and |'incsearch'| options. - *+farsi* Removed: |farsi| language -N *+file_in_path* |gf|, |CTRL-W_f| and |<cfile>| +T *+file_in_path* |gf|, |CTRL-W_f| and |<cfile>| Always enabled since + 9.0.265 N *+find_in_path* include file searches: |[I|, |:isearch|, |CTRL-W_CTRL-I|, |:checkpath|, etc. N *+folding* |folding| |