This repository was archived by the owner on Feb 24, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 163
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)
-
-
jshintSee the JSHint docs for a full list of options. In the jshint section the contents of theoptionssection is equivalent to what you would include in a.jshintrcfile.-
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" ]
}
}
- 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") :-
collapseput braces on the same line as control statements (default), -
expandput braces on own line (Allman / ANSI style) -
end-expandput end braces on own line. -
expand-strictput 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 totruewill disable mark occurrences. Defaultfalse -
retain: If set totruewill 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.