2014-01-25 19:34:32 +00:00
|
|
|
title: $:/plugins/tiddlywiki/codemirror/instructions
|
|
|
|
|
|
|
|
! Configuration
|
|
|
|
|
2014-01-25 21:53:52 +00:00
|
|
|
* You can configure the CodeMirror plugin by creating a tiddler called [[$:/config/CodeMirror]] containing a JSON configuration object.
|
|
|
|
* The configuration tiddler needs to be `type: application/json`, to take effect.
|
|
|
|
|
|
|
|
For example:
|
2014-01-25 19:34:32 +00:00
|
|
|
|
|
|
|
```
|
|
|
|
{
|
|
|
|
"require": [
|
2014-05-06 21:57:10 +00:00
|
|
|
"$:/plugins/tiddlywiki/codemirror/mode/javascript/javascript.js",
|
|
|
|
"$:/plugins/tiddlywiki/codemirror/addon/dialog/dialog.js",
|
|
|
|
"$:/plugins/tiddlywiki/codemirror/addon/search/searchcursor.js",
|
2014-06-07 15:04:43 +00:00
|
|
|
"$:/plugins/tiddlywiki/codemirror/addon/edit/matchbrackets.js",
|
2014-01-25 19:34:32 +00:00
|
|
|
"$:/plugins/tiddlywiki/codemirror/keymap/vim.js",
|
|
|
|
"$:/plugins/tiddlywiki/codemirror/keymap/emacs.js"
|
|
|
|
],
|
|
|
|
"configuration": {
|
|
|
|
"keyMap": "vim",
|
2014-06-07 15:04:43 +00:00
|
|
|
"matchBrackets":true,
|
2014-01-25 19:34:32 +00:00
|
|
|
"showCursorWhenSelecting": true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
```
|