This repository has been archived by the owner on Feb 24, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 166
Configuration
aclement edited this page Jan 3, 2013
·
16 revisions
Scripted is configured via a JSON formatted ~/.scriptedrc/scripted.json
in your user's home directory or a .scripted
file in the project root.
There is no UI support for configuration. Just edit your .scripted
file using scripted.
This page describes all configuration recognized in the configuration files.
All the elements are optional. Anything supplied in .scripted
or ~/.scriptedrc/scripted.json
will
override built-in defaults. Conflicts between .scripted
and ~/.scriptedrc/scripted.json
are resolved
in favor of .scripted
.
See issue SCRIPTED-76 for
more detailed information on how .scriptedrc
and .scripted
get merged.
The config file is of this form:
{
"formatter": {
"js": {
"indent_size": 1,
"indent_char": "\t"
}
},
"ui": {
"font":"Monaco",
"font_size":12,
"navigator": false
}
}
-
ui
-
font
: String - the name of the font -
font_size
: num - the size of the font -
navigator
: bool (determine whether to hide/show the navigator)
-
-
jshint
See the JSHint docs for a full list of options. In the jshint section the contents of theoptions
section is equivalent to what you would include in a.jshintrc
file.-
options
: list of jshint options -
global
: list of global variables. This can be used as an alternative to settingoptions.predef
Example:
-
{ "jshint": { "options": { "browser": true }, "global": [ "require", "console", "foo:false" ] } }
- formatter
- js
-
indent_size
(default 4) : indentation size, -
indent_char
(default space) : character to indent with, -
preserve_newlines
(default true) : whether existing line breaks should be preserved, -
preserve_max_newlines
(default unlimited) : maximum number of line breaks to be preserved in one chunk -
jslint_happy
(default false) : if true, then jslint-stricter mode is enforced. jslint_happy will give 'function ()' !jslint_happy will give 'function()' -
brace_style
(default "collapse") :-
collapse
put braces on the same line as control statements (default), -
expand
put braces on own line (Allman / ANSI style) -
end-expand
put end braces on own line. -
expand-strict
put brace on own line even in such cases:
-
-
- js
var a = { a: 5, b: 6 }
This mode may break your scripts, so beware\! - e.g when returning an object literal.
* `space_before_conditional` (default true) should the space before conditional statement be added, `if(true)` vs if (true)`
* `unescape_strings` (default false) ? should printable characters in strings encoded in \xNN notation be unescaped, `"example"` vs `"\x65\x78\x61\x6d\x70\x6c\x65"`
- mark_occurrences : this section configures mark occurrences in the editor.
-
interval
: The amount of time between moving the caret and invoking the mark_occurrences operation. Default 500., -
disable
: If set totrue
will disable mark occurrences. Defaultfalse
-
retain
: If set totrue
will retain the previous marks even after the caret position is moved to another (non-word) location. Defaultfalse
-
- exec : this section configures shell commands to be executed when certain keybindings or events occur. For a detailed description visit the Executing Shell Commands page.