Also update the vim/syntax README.
! 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
: generate-vim-syntax ( -- )
IN: editors.vim.generate-syntax
: generate-vim-syntax ( -- )
- "resource:misc/factor.vim.fgen" <fhtml>
- "resource:misc/vim/syntax/factor.vim"
- template-convert ;
+ "resource:misc/vim/syntax/factor/generated.vim"
+ utf8 "resource:misc/factor.vim.fgen" parse-file
+ with-file-writer ;
MAIN: generate-vim-syntax
MAIN: generate-vim-syntax
-The file-layout exactly matches the Vim runtime
-structure, 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
-`:help 'runtimepath'` for details).
+The file-layout exactly matches the Vim runtime structure,
+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 `:help 'runtimepath'` for details).
* ftdetect/factor.vim - Teach Vim when to load Factor support files.
* ftplugin/factor.vim - Teach Vim to follow the Factor Coding Style guidelines.
* 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-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.
-The syntax-highlighting file is automatically generated to include the
-names of all the vocabularies Factor knows about. To regenerate it manually,
-run the following code in the listener:
+The `syntax/factor/generated.vim` syntax highlighting file
+is automatically generated
+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