InlineEdit: Add Sublime Text keymap
Sublime Text keymap has been available since CodeMirror 4.0. This change enables using it in the EditScreen. Change-Id: I34e82fceb9502405d8d03a6c6117d4900d08248e
This commit is contained in:
@@ -1814,7 +1814,7 @@ CodeMirror themes are supported. Light themes `DEFAULT`, `ECLIPSE`,
|
|||||||
`ELEGANT`, `NEAT`. Dark themes `MIDNIGHT`, `NIGHT`, `TWILIGHT`.
|
`ELEGANT`, `NEAT`. Dark themes `MIDNIGHT`, `NIGHT`, `TWILIGHT`.
|
||||||
|`key_map_type` ||
|
|`key_map_type` ||
|
||||||
The CodeMirror key map. Currently only a subset of key maps are
|
The CodeMirror key map. Currently only a subset of key maps are
|
||||||
supported: `DEFAULT`, `EMACS`, `VIM`.
|
supported: `DEFAULT`, `EMACS`, `SUBLIME`, `VIM`.
|
||||||
|`tab_size` ||
|
|`tab_size` ||
|
||||||
Number of spaces that should be used to display one tab.
|
Number of spaces that should be used to display one tab.
|
||||||
|`line_length` ||
|
|`line_length` ||
|
||||||
|
@@ -17,5 +17,6 @@ package com.google.gerrit.extensions.client;
|
|||||||
public enum KeyMapType {
|
public enum KeyMapType {
|
||||||
DEFAULT,
|
DEFAULT,
|
||||||
EMACS,
|
EMACS,
|
||||||
|
SUBLIME,
|
||||||
VIM
|
VIM
|
||||||
}
|
}
|
@@ -321,6 +321,9 @@ public class EditPreferencesBox extends Composite {
|
|||||||
keyMap.addItem(
|
keyMap.addItem(
|
||||||
KeyMapType.EMACS.name().toLowerCase(),
|
KeyMapType.EMACS.name().toLowerCase(),
|
||||||
KeyMapType.EMACS.name());
|
KeyMapType.EMACS.name());
|
||||||
|
keyMap.addItem(
|
||||||
|
KeyMapType.SUBLIME.name().toLowerCase(),
|
||||||
|
KeyMapType.SUBLIME.name());
|
||||||
keyMap.addItem(
|
keyMap.addItem(
|
||||||
KeyMapType.VIM.name().toLowerCase(),
|
KeyMapType.VIM.name().toLowerCase(),
|
||||||
KeyMapType.VIM.name());
|
KeyMapType.VIM.name());
|
||||||
|
@@ -8,8 +8,9 @@ CM_CSS = [
|
|||||||
CM_JS = [
|
CM_JS = [
|
||||||
'lib/codemirror.js',
|
'lib/codemirror.js',
|
||||||
'mode/meta.js',
|
'mode/meta.js',
|
||||||
'keymap/vim.js',
|
|
||||||
'keymap/emacs.js',
|
'keymap/emacs.js',
|
||||||
|
'keymap/sublime.js',
|
||||||
|
'keymap/vim.js',
|
||||||
]
|
]
|
||||||
|
|
||||||
CM_ADDONS = [
|
CM_ADDONS = [
|
||||||
|
Reference in New Issue
Block a user