1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-15 23:00:36 +02:00

Desktop: Resolves #1298: Add keyboard modes to editor (vim, emacs) (#2056)

* Add keyboard modes to editor (vim, emacs, default)

This adds a new option to settings, and then sets the
appropriate keyboard handler in the ace editor.

The "default" option is equivalent to the old keyboard
behaviour.

* Remove stray console.log

* Move the keyboard-mode setting to the general section

* Change `keyboardMode` setting to `editor.keyboardMode`
This commit is contained in:
Shane Kilkelly
2019-11-06 21:51:08 +00:00
committed by Laurent Cozic
parent 8d6cfdc292
commit fa3f0d2071
3 changed files with 36 additions and 2 deletions

View File

@ -36,7 +36,21 @@ class Setting extends BaseModel {
type: Setting.TYPE_STRING,
public: false,
},
'editor.keyboardMode': {
value: 'default',
type: Setting.TYPE_STRING,
public: true,
appTypes: ['desktop'],
isEnum: true,
label: () => _('Keyboard Mode'),
options: () => {
let output = {};
output['default'] = _('Default');
output['emacs'] = _('Emacs');
output['vim'] = _('Vim');
return output;
},
},
'sync.target': {
value: SyncTargetRegistry.nameToId('dropbox'),
type: Setting.TYPE_INT,