editors.vim.generate-syntax: Match new generation

Also update the vim/syntax README.
master
Dusk 2020-06-06 20:24:56 -07:00 committed by John Benediktsson
parent 35b8621306
commit f70ce01b51
2 changed files with 15 additions and 12 deletions

View File

@ -1,10 +1,10 @@
! Generate a new factor.vim file for syntax highlighting ! Generate a new factor.vim file for syntax highlighting
USING: html.templates html.templates.fhtml io.files io.pathnames ; USING: io.encodings.utf8 io.files parser ;
IN: editors.vim.generate-syntax IN: editors.vim.generate-syntax
: generate-vim-syntax ( -- ) : generate-vim-syntax ( -- )
"resource:misc/factor.vim.fgen" <fhtml> "resource:misc/vim/syntax/factor/generated.vim"
"resource:misc/vim/syntax/factor.vim" utf8 "resource:misc/factor.vim.fgen" parse-file
template-convert ; with-file-writer ;
MAIN: generate-vim-syntax MAIN: generate-vim-syntax

View File

@ -6,10 +6,10 @@ more pleasant in Vim.
## Installation ## Installation
The file-layout exactly matches the Vim runtime The file-layout exactly matches the Vim runtime structure,
structure, so you can install them by copying the contents of this directory so you can install them by copying the contents of this directory
into `~/.vim/` or the equivalent path on other platforms (Open Vim and type into `~/.vim/` or the equivalent path on other platforms
`:help 'runtimepath'` for details). (open Vim and type `:help 'runtimepath'` for details).
## File organization ## File organization
@ -17,8 +17,10 @@ The current set of files is as follows:
* ftdetect/factor.vim - Teach Vim when to load Factor support files. * ftdetect/factor.vim - Teach Vim when to load Factor support files.
* ftplugin/factor.vim - Teach Vim to follow the Factor Coding Style guidelines. * ftplugin/factor.vim - Teach Vim to follow the Factor Coding Style guidelines.
* ftplugin/factor-docs.vim - Teach Vim about documentation style differences.
* plugin/factor.vim - Teach Vim some commands for navigating Factor source code. See below. * plugin/factor.vim - Teach Vim some commands for navigating Factor source code. See below.
* syntax/factor.vim - Syntax highlighting for Factor code. * syntax/factor.vim - Teach Vim about highlighting Factor source code syntax.
* syntax/factor/generated.vim - Syntax highlighting lessons generated from a Factor VM.
## Commands ## Commands
@ -70,9 +72,10 @@ The default value is `work`.
## Note ## Note
The syntax-highlighting file is automatically generated to include the The `syntax/factor/generated.vim` syntax highlighting file
names of all the vocabularies Factor knows about. To regenerate it manually, is automatically generated
run the following code in the listener: to include the names of all the vocabularies Factor knows about.
To regenerate it manually, run the following code in the listener:
"editors.vim.generate-syntax" run "editors.vim.generate-syntax" run