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`.
|
||||
|`key_map_type` ||
|
||||
The CodeMirror key map. Currently only a subset of key maps are
|
||||
supported: `DEFAULT`, `EMACS`, `VIM`.
|
||||
supported: `DEFAULT`, `EMACS`, `SUBLIME`, `VIM`.
|
||||
|`tab_size` ||
|
||||
Number of spaces that should be used to display one tab.
|
||||
|`line_length` ||
|
||||
|
@@ -17,5 +17,6 @@ package com.google.gerrit.extensions.client;
|
||||
public enum KeyMapType {
|
||||
DEFAULT,
|
||||
EMACS,
|
||||
SUBLIME,
|
||||
VIM
|
||||
}
|
@@ -321,6 +321,9 @@ public class EditPreferencesBox extends Composite {
|
||||
keyMap.addItem(
|
||||
KeyMapType.EMACS.name().toLowerCase(),
|
||||
KeyMapType.EMACS.name());
|
||||
keyMap.addItem(
|
||||
KeyMapType.SUBLIME.name().toLowerCase(),
|
||||
KeyMapType.SUBLIME.name());
|
||||
keyMap.addItem(
|
||||
KeyMapType.VIM.name().toLowerCase(),
|
||||
KeyMapType.VIM.name());
|
||||
|
@@ -8,8 +8,9 @@ CM_CSS = [
|
||||
CM_JS = [
|
||||
'lib/codemirror.js',
|
||||
'mode/meta.js',
|
||||
'keymap/vim.js',
|
||||
'keymap/emacs.js',
|
||||
'keymap/sublime.js',
|
||||
'keymap/vim.js',
|
||||
]
|
||||
|
||||
CM_ADDONS = [
|
||||
|
Reference in New Issue
Block a user