Don't don't re-focus a focused textarea
It causes side effects on iOS On old IEs, don't do this check, since it sometimes raises weird exceptions, and re-focusing is harmless there.
Rewrite formatting.js to use available mode tokenizer
Remove a bunch of regexp kludges that never really worked. Will need to be tested more rigorously (I only tried the existing demo).
[vim] Ctrl-[ leaves insert mode, same as <Esc>
As a die-hard vim addict, long ago, I retrained myself to type Ctrl-[ to
leave insert mode. This sends the same control sequence as escape in
many other places, actually, and this patch brings this functionality to
CodeMirror.
From vim's :help ctrl-[
*i_CTRL-[* *i_<Esc>*
<Esc> or CTRL-[
End insert or Replace mode, go back to Normal mode.
Finish abbreviation.
Note: If your <Esc> key is hard to hit on your keyboard, train
yourself to use CTRL-[.
Typing CTRL-[ is particularly easy when caps-lock is remapped
to being another CTRL key, since now neither hand needs to move away
form the homerow, and both little fingers just slide a little, the left
little finger slides to the right to where caps lock used to be, and the
right little finger slides a little bit up to the '[' keyMake htmlmixed properly check for "tag" style
This allows the xml mode to return a style with space separated classes and still work. I didn't use /\btag\b/ since that can match "tag-foo".
Move the previous mode property before adding mode extensions
This stores the previous value for a mode property if an extension overwrites it with a new value. The old value is stored in a property prefixed with an underscore (e.g. "_token"). This allows extensions to piggyback the old value by still being able to access it.
fix extra indentation in array initialization
array initialization (one entry per line) results in extra indentation from second element onwards:
ex:-
const string[] fields = {
"one",
"two",
"three"
};See discussion in #984
Support blank lines in CodeMirror.multiplexingMode
This adds a blankLine method that calls the current mode's blankLine if it has one. It has allows switching on a blank line if "\n" is specified for "open" or "close".
[vim keymap] added Home, End, PageUp, PageDown, |
moveByLines was changed to better keep track of the previous action. For example, if moveToEol was the previous action, moving up or down should stay at Eol regardless of line length.
[vim keymap] Add indentation for newlines from o/O
Use newlineAndIndentContinueComment by default, falling back to newlineAndIndent if the former command is not defined.
Same behavior is made default for Enter key in insert mode.Clean up to meet JSHint compliance.
Various other style fixes. Updates to comments.
[htmlembedded mode] Don't directly call startState and indent on unkn…
…own mode It may not provide these methods. Closes #1051