From ac8868953307949410815784354b8055b3e377b4 Mon Sep 17 00:00:00 2001 From: tophf Date: Wed, 10 Jun 2015 12:58:01 +0300 Subject: [PATCH] Editor: set OS-dependent default keymap consistently --- edit.js | 2 +- storage.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/edit.js b/edit.js index 5a239699..ef33c0dd 100644 --- a/edit.js +++ b/edit.js @@ -138,7 +138,7 @@ function initCodeMirror() { lint: CodeMirror.lint.css, styleActiveLine: true, theme: "default", - keyMap: isWindowsOS ? "sublime" : "default", + keyMap: prefs.getPref("editor.keyMap"), extraKeys: { // independent of current keyMap "Alt-PageDown": "nextEditor", "Alt-PageUp": "prevEditor" diff --git a/storage.js b/storage.js index 70a064de..f7f03cdc 100644 --- a/storage.js +++ b/storage.js @@ -178,7 +178,7 @@ var prefs = { "editor.smartIndent": true, // "smart" indent "editor.indentWithTabs": false,// smart indent with tabs "editor.tabSize": 4, // tab width, in spaces - "editor.keyMap": "sublime", // keymap + "editor.keyMap": navigator.appVersion.indexOf("Windows") > 0 ? "sublime" : "default", "editor.theme": "default", // CSS theme NO_DEFAULT_PREFERENCE: "No default preference for '%s'",