mirror of
https://github.com/chinchang/web-maker.git
synced 2025-02-24 07:03:13 +01:00
add basic support for vim. commands dont show right now. fixes #83
This commit is contained in:
parent
7adacbabe7
commit
403a078a3e
@ -392,6 +392,12 @@
|
||||
Theme
|
||||
<select style="flex:1;margin:0 20px" data-setting="editorTheme" d-change="updateSetting"></select>
|
||||
</label>
|
||||
<label class="line">
|
||||
<input type="radio" checked="true" name="keymap" value="sublime" d-change="updateSetting" data-setting="keymap"> Sublime key bindings
|
||||
</label>
|
||||
<label class="line">
|
||||
<input type="radio" name="keymap" value="vim" d-change="updateSetting" data-setting="keymap"> Vim key bindings
|
||||
</label>
|
||||
<label class="line">
|
||||
<input type="checkbox" d-change="updateSetting" data-setting="preserveLastCode"> Preserve last written code
|
||||
</label>
|
||||
@ -581,6 +587,7 @@ Import
|
||||
<script src="lib/codemirror/mode/css/css.js"></script>
|
||||
<script src="lib/codemirror/mode/htmlmixed/htmlmixed.js"></script>
|
||||
<script src="lib/codemirror/keymap/sublime.js"></script>
|
||||
<script src="lib/codemirror/keymap/vim.js"></script>
|
||||
<script src="lib/emmet.js"></script>
|
||||
<script src="lib/code-blast.js"></script>
|
||||
|
||||
|
5117
src/lib/codemirror/keymap/vim.js
vendored
Normal file
5117
src/lib/codemirror/keymap/vim.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
@ -1143,6 +1143,7 @@ onboardDontShowInTabOptionBtn, TextareaAutoComplete */
|
||||
$('[data-setting=indentWith][value=' + (prefs.indentWith || 'spaces') + ']').checked = true;
|
||||
$('[data-setting=isCodeBlastOn]').checked = prefs.isCodeBlastOn;
|
||||
$('[data-setting=editorTheme]').value = prefs.editorTheme;
|
||||
$('[data-setting=keymap]').value = prefs.keymap;
|
||||
}
|
||||
|
||||
scope.updateSetting = function updateSetting(e) {
|
||||
@ -1168,6 +1169,7 @@ onboardDontShowInTabOptionBtn, TextareaAutoComplete */
|
||||
scope.cm[type].setOption('indentUnit', $('[data-setting=indentSize]').value);
|
||||
scope.cm[type].setOption('tabSize', $('[data-setting=indentSize]').value);
|
||||
scope.cm[type].setOption('theme', $('[data-setting=editorTheme]').value);
|
||||
scope.cm[type].setOption('keyMap', $('[data-setting=keymap]').value);
|
||||
});
|
||||
};
|
||||
|
||||
@ -1435,7 +1437,8 @@ onboardDontShowInTabOptionBtn, TextareaAutoComplete */
|
||||
isCodeBlastOn: false,
|
||||
indentWith: 'spaces',
|
||||
indentSize: 2,
|
||||
editorTheme: 'monokai'
|
||||
editorTheme: 'monokai',
|
||||
keymap: 'sublime'
|
||||
}, function syncGetCallback(result) {
|
||||
if (result.preserveLastCode && lastCode) {
|
||||
unsavedEditCount = 0;
|
||||
@ -1462,6 +1465,7 @@ onboardDontShowInTabOptionBtn, TextareaAutoComplete */
|
||||
prefs.indentSize = result.indentSize;
|
||||
prefs.indentWith = result.indentWith;
|
||||
prefs.editorTheme = result.editorTheme;
|
||||
prefs.keymap = result.keymap;
|
||||
|
||||
updateSettingsInUi();
|
||||
scope.updateSetting();
|
||||
|
Loading…
x
Reference in New Issue
Block a user