From: Dusk Date: Sun, 7 Jun 2020 03:24:56 +0000 (-0700) Subject: editors.vim.generate-syntax: Match new generation X-Git-Tag: 0.99~3179 X-Git-Url: https://gitweb.factorcode.org/gitweb.cgi?p=factor.git;a=commitdiff_plain;h=f70ce01b5191ef73d996e0d15fd673c4c3a221eb editors.vim.generate-syntax: Match new generation Also update the vim/syntax README. --- diff --git a/basis/editors/vim/generate-syntax/generate-syntax.factor b/basis/editors/vim/generate-syntax/generate-syntax.factor index 40cce60443..3df11f3fda 100644 --- a/basis/editors/vim/generate-syntax/generate-syntax.factor +++ b/basis/editors/vim/generate-syntax/generate-syntax.factor @@ -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" - "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 diff --git a/misc/vim/README.md b/misc/vim/README.md index 12cd1a51f6..5c237fa031 100644 --- a/misc/vim/README.md +++ b/misc/vim/README.md @@ -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