]> gitweb.factorcode.org Git - factor.git/commitdiff
editors.vim.generate-syntax: Match new generation
authorDusk <me@bb010g.com>
Sun, 7 Jun 2020 03:24:56 +0000 (20:24 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Sun, 7 Jun 2020 03:32:17 +0000 (20:32 -0700)
Also update the vim/syntax README.

basis/editors/vim/generate-syntax/generate-syntax.factor
misc/vim/README.md

index 40cce60443919ae3a0083043509b68b35d003d29..3df11f3fda5a91bcb785726cad92e9bd544d45e7 100644 (file)
@@ -1,10 +1,10 @@
 ! 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 ( -- )
-    "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
index 12cd1a51f697d7ac2e3f594bb889888e64c7a3ab..5c237fa03107fe632cc7291a1ccb9ba0d4fb9f36 100644 (file)
@@ -6,10 +6,10 @@ more pleasant in Vim.
 
 ## Installation
 
-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).
 
 ## 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.
 * 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.
-* 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
 
@@ -70,9 +72,10 @@ The default value is `work`.
 
 ## Note
 
-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