4 This directory contains various support files that make editing Factor code
9 The file-layout exactly matches the Vim runtime
10 structure, so you can install them by copying the contents of this directory
11 into `~/.vim/` or the equivalent path on other platforms (Open Vim and type
12 `:help 'runtimepath'` for details).
16 The current set of files is as follows:
18 * ftdetect/factor.vim - Teach Vim when to load Factor support files.
19 * ftplugin/factor.vim - Teach Vim to follow the Factor Coding Style guidelines.
20 * plugin/factor.vim - Teach Vim some commands for navigating Factor source code. See below.
21 * syntax/factor.vim - Syntax highlighting for Factor code.
25 The `plugin/factor.vim` file implements the following commands for navigating Factor source.
27 ### :FactorVocab factor.vocab.name
29 Opens the source file implementing the `factor.vocab.name` vocabulary.
31 ### :NewFactorVocab factor.vocab.name
33 Creates a new factor vocabulary under the working vocabulary root.
37 Opens the main implementation file for the current vocabulary
38 (name.factor). The keyboard shortcut `<Leader>fi` is bound to this command.
42 Opens the documentation file for the current vocabulary
43 (name-docs.factor). The keyboard shortcut `<Leader>fd` is bound to this command.
47 Opens the unit test file for the current vocabulary
48 (name-tests.factor). The keyboard shortcut `<Leader>ft` is bound to this command.
52 In order for the `:FactorVocab` command to work, you'll need to set some variables in your vimrc file.
56 This variable should be set to the root of your Factor
57 installation. The default value is `~/factor`.
59 ### g:FactorVocabRoots
61 This variable should be set to a list of Factor vocabulary roots.
62 The paths may be either relative to g:FactorRoot or absolute paths.
63 The default value is `["core", "basis", "extra", "work"]`.
65 ### g:FactorNewVocabRoot
67 This variable should be set to the vocabulary root in which
68 vocabularies created with NewFactorVocab should be created.
69 The default value is `work`.
73 The syntax-highlighting file is automatically generated to include the
74 names of all the vocabularies Factor knows about. To regenerate it manually,
75 run the following code in the listener:
77 "editors.vim.generate-syntax" run
79 or run it from the command line:
81 factor -run=editors.vim.generate-syntax