|
1 | 1 | *scala.txt* Syntax highlighting and helper functions for the Scala language.
|
2 | 2 |
|
| 3 | +This plugin is only available if 'compatible' is not set. |
| 4 | +{Vi does not have any of this} |
| 5 | + |
| 6 | +============================================================================== |
3 | 7 | INTRODUCTION *scala*
|
4 | 8 |
|
5 |
| -Syntax highlighting and helper functions for the scala language. |
| 9 | +Syntax highlighting and helper functions for the scala language. Extras |
| 10 | +include: |
| 11 | + |
| 12 | + - Sorting of import statements, configurable to your conventions. |
| 13 | + - Tagbar support to navigate definitions within a file in the plugin's |
| 14 | + sidebar window. |
| 15 | + - ...and probably more that we've forgotten to update in this doc. |
| 16 | + |
| 17 | +============================================================================== |
| 18 | +OPTIONS *scala-options* |
| 19 | + |
| 20 | +Use these options to control behavior of the plugin. Default values are |
| 21 | +indicated in the examples. |
6 | 22 |
|
| 23 | + *'g:scala_use_builtin_tagbar_defs'* |
| 24 | +If you are using the Tagbar Vim plugin, vim-scala includes a Tagbar type |
| 25 | +definition and ctags definition for Scala, so you can use Tagbar immediately. |
| 26 | +If you have your own ctags definition in `~/.ctags` and prefer to use it, set |
| 27 | +this option to 0 (we would appreciate contributions if you've improved the |
| 28 | +ctags definition!). |
| 29 | + |
| 30 | +Note that Tagbar's ctags definition for Scala is not used to generate a |
| 31 | +|tags| file that Vim can use to navigate to definitions in other files, only |
| 32 | +for the plugin sidebar. Feel free to copy `vim-scala/ctags/scala.ctags` into |
| 33 | +your own `~/.ctags` if you wish to generate |tags| files. |
| 34 | +> |
| 35 | + let g:scala_use_builtin_tagbar_defs = 1 |
| 36 | +< |
| 37 | + *'g:scala_use_default_keymappings'* |
| 38 | +Set this option to disable definition of all mappings provided by vim-scala. |
| 39 | +See |scala-mappings|. |
| 40 | +> |
| 41 | + let g:scala_use_default_keymappings = 1 |
| 42 | +< |
| 43 | +============================================================================== |
7 | 44 | COMMANDS *scala-commands*
|
8 | 45 |
|
9 | 46 | *:SortScalaImports*
|
@@ -41,4 +78,40 @@ COMMANDS *scala-commands*
|
41 | 78 | g:scala_first_party_namespaces=
|
42 | 79 | \ '\(controllers\|views\|models\)'
|
43 | 80 |
|
| 81 | +============================================================================== |
| 82 | +MAPPINGS *scala-mappings* |
| 83 | + |
| 84 | +Currently the only mappings defined are for FuzzyFinder users--these will |
| 85 | +only be enabled if FuzzyFinder is detected. |
| 86 | + |
| 87 | + *scala-leader-fs* |
| 88 | +<Leader>fs "Find src". Primes |:FufFile| with `src/main/scala`, |
| 89 | + and goes deeper still if only a single directory |
| 90 | + exists below that. Helpful for package namespacing |
| 91 | + like `src/main/scala/com/myorg`. |
| 92 | + |
| 93 | + *scala-leader-ft* |
| 94 | +<Leader>ft "Find test". Like |scala-leader-fs|, but with |
| 95 | + `src/test/scala`. |
| 96 | + |
| 97 | + *scala-leader-fr* |
| 98 | +<Leader>fr "Find from root". For the rarer cases when you want to |
| 99 | + start FuzzyFinder at project root (parent of `src/`). |
| 100 | + |
| 101 | +Disabling Mappings~ |
| 102 | + |
| 103 | +If you wish to disable the default key mappings, write the following line in |
| 104 | +your ~/.vimrc: > |
| 105 | +
|
| 106 | + let g:scala_use_default_keymappings = 0 |
| 107 | +
|
| 108 | +============================================================================== |
| 109 | +CREDITS *scala-credits* |
| 110 | + |
| 111 | +Developed by Derek Wyatt, building on initial work by Stefan Matthias Aust. |
| 112 | +Distributed under the Apache 2 license. |
| 113 | + |
| 114 | +Project's home and Git repository: https://github.com/derekwyatt/vim-scala |
44 | 115 |
|
| 116 | +------------------------------------------------------------------------------ |
| 117 | + vim:tw=78:ts=8:ft=help:norl: |
0 commit comments