Skip to content

Commit

Permalink
Add documenation about the two modes
Browse files Browse the repository at this point in the history
  • Loading branch information
Leonard Ehrenfried committed Apr 26, 2013
1 parent 833ebda commit 03a5a67
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions doc/scala.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,20 @@ Syntax highlighting and helper functions for the scala language.
COMMANDS *scala-commands*

*:SortScalaImports*
:SortScalaImports Groups the imports a the top of the file and sorts
them alphabetically.
:SortScalaImports There are two modes in which this command can operate.
By default it walks all import groups at the top of
the Scala file and orders their lines alphabetically.
A group is a series of lines starting with the
import keyword separated by one or more blank lines.

The second, more advanced mode, can be activated by
setting

let g:scala_sort_across_groups=1

This makes this command include all imports in the
sorting regardless of blank lines in between them and
puts them in three predefined groups instead.
The three groups in which the imports can fall are:

1. Scala and Java core
Expand All @@ -24,7 +36,7 @@ COMMANDS *scala-commands*

g:scala_first_party_namespaces

For example in a standard Play! app this would be
For example in a standard Play app this would be
set to
g:scala_first_party_namespaces='\(controllers\|views\|models\)'

Expand Down

0 comments on commit 03a5a67

Please sign in to comment.