From 0e10785508bf0f8d4747db9883975400e40526ff Mon Sep 17 00:00:00 2001 From: Joe Groff Date: Thu, 10 Sep 2009 22:55:29 -0400 Subject: [PATCH] update misc/vim/README --- misc/vim/README | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/misc/vim/README b/misc/vim/README index 431427120a..0a11654f15 100644 --- a/misc/vim/README +++ b/misc/vim/README @@ -13,15 +13,46 @@ The current set of files is as follows: Teach Vim when to load Factor support files. ftplugin/factor_settings.vim Teach Vim to follow the Factor Coding Style guidelines. + plugin/factor.vim + Teach Vim some commands for navigating Factor source code. See below. syntax/factor.vim Syntax highlighting for Factor code. +The "plugin/factor.vim" file implements the following commands for +navigating Factor source: + + :FactorVocab factor.vocab.name + Opens the source file implementing the "factor.vocab.name" + vocabulary. + :FactorVocabImpl + Opens the main implementation file for the current vocabulary + (name.factor). The keyboard shortcut "\fi" is bound to this + command. + :FactorVocabDocs + Opens the documentation file for the current vocabulary + (name-docs.factor). The keyboard shortcut "\fd" is bound to this + command. + :FactorVocabTests + Opens the unit test file for the current vocabulary + (name-tests.factor). The keyboard shortcut "\ft" is bound to this + command. + +In order for the ":FactorVocab" command to work, you'll need to set some +variables in your vimrc file: + g:FactorRoot + This variable should be set to the root of your Factor + installation. The default value is "~/factor". + g:FactorVocabRoots + This variable should be set to a list of Factor vocabulary roots. + The paths may be either relative to g:FactorRoot or absolute paths. + The default value is ["core", "basis", "extra", "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: "editors.vim.generate-syntax" run -...or run it from the command-line: +...or run it from the command line: factor -run=editors.vim.generate-syntax