Update vendor dependencies

This commit is contained in:
Rob Garrison 2020-02-02 11:07:22 -06:00
parent 8e07ee697c
commit 9d765e91c6
20 changed files with 1192 additions and 404 deletions

View File

@ -8,6 +8,8 @@ const CODEMIRROR_THEMES = [
'abcdef', 'abcdef',
'ambiance', 'ambiance',
'ambiance-mobile', 'ambiance-mobile',
'ayu-dark',
'ayu-mirage',
'base16-dark', 'base16-dark',
'base16-light', 'base16-light',
'bespin', 'bespin',
@ -30,10 +32,14 @@ const CODEMIRROR_THEMES = [
'liquibyte', 'liquibyte',
'lucario', 'lucario',
'material', 'material',
'material-darker',
'material-ocean',
'material-palenight',
'mbo', 'mbo',
'mdn-like', 'mdn-like',
'midnight', 'midnight',
'monokai', 'monokai',
'moxer',
'neat', 'neat',
'neo', 'neo',
'night', 'night',

View File

@ -1,3 +1,3 @@
## CodeMirror v5.48.4 ## CodeMirror v5.51.0
Only files & folders that exist in the `vendor/codemirror` folder are copied from the `node_modules/codemirror` folder. Except all theme files are copied, in case new themes have been added. Only files & folders that exist in the `vendor/codemirror` folder are copied from the `node_modules/codemirror` folder. Except all theme files are copied, in case new themes have been added.

View File

@ -42,7 +42,7 @@
} }
if (!range || range.cleared || force === "unfold") return; if (!range || range.cleared || force === "unfold") return;
var myWidget = makeWidget(cm, options); var myWidget = makeWidget(cm, options, range);
CodeMirror.on(myWidget, "mousedown", function(e) { CodeMirror.on(myWidget, "mousedown", function(e) {
myRange.clear(); myRange.clear();
CodeMirror.e_preventDefault(e); CodeMirror.e_preventDefault(e);
@ -58,8 +58,13 @@
CodeMirror.signal(cm, "fold", cm, range.from, range.to); CodeMirror.signal(cm, "fold", cm, range.from, range.to);
} }
function makeWidget(cm, options) { function makeWidget(cm, options, range) {
var widget = getOption(cm, options, "widget"); var widget = getOption(cm, options, "widget");
if (typeof widget == "function") {
widget = widget(range.from, range.to);
}
if (typeof widget == "string") { if (typeof widget == "string") {
var text = document.createTextNode(widget); var text = document.createTextNode(widget);
widget = document.createElement("span"); widget = document.createElement("span");

View File

@ -16,7 +16,7 @@
cm.clearGutter(cm.state.foldGutter.options.gutter); cm.clearGutter(cm.state.foldGutter.options.gutter);
cm.state.foldGutter = null; cm.state.foldGutter = null;
cm.off("gutterClick", onGutterClick); cm.off("gutterClick", onGutterClick);
cm.off("change", onChange); cm.off("changes", onChange);
cm.off("viewportChange", onViewportChange); cm.off("viewportChange", onViewportChange);
cm.off("fold", onFold); cm.off("fold", onFold);
cm.off("unfold", onFold); cm.off("unfold", onFold);
@ -26,7 +26,7 @@
cm.state.foldGutter = new State(parseOptions(val)); cm.state.foldGutter = new State(parseOptions(val));
updateInViewport(cm); updateInViewport(cm);
cm.on("gutterClick", onGutterClick); cm.on("gutterClick", onGutterClick);
cm.on("change", onChange); cm.on("changes", onChange);
cm.on("viewportChange", onViewportChange); cm.on("viewportChange", onViewportChange);
cm.on("fold", onFold); cm.on("fold", onFold);
cm.on("unfold", onFold); cm.on("unfold", onFold);
@ -71,24 +71,36 @@
} }
function updateFoldInfo(cm, from, to) { function updateFoldInfo(cm, from, to) {
var opts = cm.state.foldGutter.options, cur = from; var opts = cm.state.foldGutter.options, cur = from - 1;
var minSize = cm.foldOption(opts, "minFoldSize"); var minSize = cm.foldOption(opts, "minFoldSize");
var func = cm.foldOption(opts, "rangeFinder"); var func = cm.foldOption(opts, "rangeFinder");
// we can reuse the built-in indicator element if its className matches the new state
var clsFolded = typeof opts.indicatorFolded == "string" && classTest(opts.indicatorFolded);
var clsOpen = typeof opts.indicatorOpen == "string" && classTest(opts.indicatorOpen);
cm.eachLine(from, to, function(line) { cm.eachLine(from, to, function(line) {
++cur;
var mark = null; var mark = null;
var old = line.gutterMarkers;
if (old) old = old[opts.gutter];
if (isFolded(cm, cur)) { if (isFolded(cm, cur)) {
if (clsFolded && old && clsFolded.test(old.className)) return;
mark = marker(opts.indicatorFolded); mark = marker(opts.indicatorFolded);
} else { } else {
var pos = Pos(cur, 0); var pos = Pos(cur, 0);
var range = func && func(cm, pos); var range = func && func(cm, pos);
if (range && range.to.line - range.from.line >= minSize) if (range && range.to.line - range.from.line >= minSize) {
if (clsOpen && old && clsOpen.test(old.className)) return;
mark = marker(opts.indicatorOpen); mark = marker(opts.indicatorOpen);
} }
}
if (!mark && !old) return;
cm.setGutterMarker(line, opts.gutter, mark); cm.setGutterMarker(line, opts.gutter, mark);
++cur;
}); });
} }
// copied from CodeMirror/src/util/dom.js
function classTest(cls) { return new RegExp("(^|\\s)" + cls + "(?:$|\\s)\\s*") }
function updateInViewport(cm) { function updateInViewport(cm) {
var vp = cm.getViewport(), state = cm.state.foldGutter; var vp = cm.getViewport(), state = cm.state.foldGutter;
if (!state) return; if (!state) return;

View File

@ -11,9 +11,15 @@
})(function(CodeMirror) { })(function(CodeMirror) {
"use strict"; "use strict";
var pseudoClasses = {link: 1, visited: 1, active: 1, hover: 1, focus: 1, var pseudoClasses = {"active":1, "after":1, "before":1, "checked":1, "default":1,
"first-letter": 1, "first-line": 1, "first-child": 1, "disabled":1, "empty":1, "enabled":1, "first-child":1, "first-letter":1,
before: 1, after: 1, lang: 1}; "first-line":1, "first-of-type":1, "focus":1, "hover":1, "in-range":1,
"indeterminate":1, "invalid":1, "lang":1, "last-child":1, "last-of-type":1,
"link":1, "not":1, "nth-child":1, "nth-last-child":1, "nth-last-of-type":1,
"nth-of-type":1, "only-of-type":1, "only-child":1, "optional":1, "out-of-range":1,
"placeholder":1, "read-only":1, "read-write":1, "required":1, "root":1,
"selection":1, "target":1, "valid":1, "visited":1
};
CodeMirror.registerHelper("hint", "css", function(cm) { CodeMirror.registerHelper("hint", "css", function(cm) {
var cur = cm.getCursor(), token = cm.getTokenAt(cur); var cur = cm.getCursor(), token = cm.getTokenAt(cur);

View File

@ -322,6 +322,7 @@
CodeMirror.on(hints, "mousedown", function() { CodeMirror.on(hints, "mousedown", function() {
setTimeout(function(){cm.focus();}, 20); setTimeout(function(){cm.focus();}, 20);
}); });
this.scrollToActive()
CodeMirror.signal(data, "select", completions[this.selectedHint], hints.childNodes[this.selectedHint]); CodeMirror.signal(data, "select", completions[this.selectedHint], hints.childNodes[this.selectedHint]);
return true; return true;
@ -363,11 +364,16 @@
if (node) node.className = node.className.replace(" " + ACTIVE_HINT_ELEMENT_CLASS, ""); if (node) node.className = node.className.replace(" " + ACTIVE_HINT_ELEMENT_CLASS, "");
node = this.hints.childNodes[this.selectedHint = i]; node = this.hints.childNodes[this.selectedHint = i];
node.className += " " + ACTIVE_HINT_ELEMENT_CLASS; node.className += " " + ACTIVE_HINT_ELEMENT_CLASS;
this.scrollToActive()
CodeMirror.signal(this.data, "select", this.data.list[this.selectedHint], node);
},
scrollToActive: function() {
var node = this.hints.childNodes[this.selectedHint]
if (node.offsetTop < this.hints.scrollTop) if (node.offsetTop < this.hints.scrollTop)
this.hints.scrollTop = node.offsetTop - 3; this.hints.scrollTop = node.offsetTop - 3;
else if (node.offsetTop + node.offsetHeight > this.hints.scrollTop + this.hints.clientHeight) else if (node.offsetTop + node.offsetHeight > this.hints.scrollTop + this.hints.clientHeight)
this.hints.scrollTop = node.offsetTop + node.offsetHeight - this.hints.clientHeight + 3; this.hints.scrollTop = node.offsetTop + node.offsetHeight - this.hints.clientHeight + 3;
CodeMirror.signal(this.data, "select", this.data.list[this.selectedHint], node);
}, },
screenAmount: function() { screenAmount: function() {

View File

@ -43,7 +43,7 @@
cm.on("markerAdded", this.resizeHandler); cm.on("markerAdded", this.resizeHandler);
cm.on("markerCleared", this.resizeHandler); cm.on("markerCleared", this.resizeHandler);
if (options.listenForChanges !== false) if (options.listenForChanges !== false)
cm.on("change", this.changeHandler = function() { cm.on("changes", this.changeHandler = function() {
scheduleRedraw(250); scheduleRedraw(250);
}); });
} }
@ -116,7 +116,7 @@
this.cm.off("refresh", this.resizeHandler); this.cm.off("refresh", this.resizeHandler);
this.cm.off("markerAdded", this.resizeHandler); this.cm.off("markerAdded", this.resizeHandler);
this.cm.off("markerCleared", this.resizeHandler); this.cm.off("markerCleared", this.resizeHandler);
if (this.changeHandler) this.cm.off("change", this.changeHandler); if (this.changeHandler) this.cm.off("changes", this.changeHandler);
this.div.parentNode.removeChild(this.div); this.div.parentNode.removeChild(this.div);
}; };
}); });

View File

@ -72,24 +72,26 @@
} }
} }
function lastMatchIn(string, regexp) { function lastMatchIn(string, regexp, endMargin) {
var cutOff = 0, match var match, from = 0
for (;;) { while (from <= string.length) {
regexp.lastIndex = cutOff regexp.lastIndex = from
var newMatch = regexp.exec(string) var newMatch = regexp.exec(string)
if (!newMatch) return match if (!newMatch) break
var end = newMatch.index + newMatch[0].length
if (end > string.length - endMargin) break
if (!match || end > match.index + match[0].length)
match = newMatch match = newMatch
cutOff = match.index + (match[0].length || 1) from = newMatch.index + 1
if (cutOff == string.length) return match
} }
return match
} }
function searchRegexpBackward(doc, regexp, start) { function searchRegexpBackward(doc, regexp, start) {
regexp = ensureFlags(regexp, "g") regexp = ensureFlags(regexp, "g")
for (var line = start.line, ch = start.ch, first = doc.firstLine(); line >= first; line--, ch = -1) { for (var line = start.line, ch = start.ch, first = doc.firstLine(); line >= first; line--, ch = -1) {
var string = doc.getLine(line) var string = doc.getLine(line)
if (ch > -1) string = string.slice(0, ch) var match = lastMatchIn(string, regexp, ch < 0 ? 0 : string.length - ch)
var match = lastMatchIn(string, regexp)
if (match) if (match)
return {from: Pos(line, match.index), return {from: Pos(line, match.index),
to: Pos(line, match.index + match[0].length), to: Pos(line, match.index + match[0].length),
@ -98,16 +100,17 @@
} }
function searchRegexpBackwardMultiline(doc, regexp, start) { function searchRegexpBackwardMultiline(doc, regexp, start) {
if (!maybeMultiline(regexp)) return searchRegexpBackward(doc, regexp, start)
regexp = ensureFlags(regexp, "gm") regexp = ensureFlags(regexp, "gm")
var string, chunk = 1 var string, chunkSize = 1, endMargin = doc.getLine(start.line).length - start.ch
for (var line = start.line, first = doc.firstLine(); line >= first;) { for (var line = start.line, first = doc.firstLine(); line >= first;) {
for (var i = 0; i < chunk; i++) { for (var i = 0; i < chunkSize && line >= first; i++) {
var curLine = doc.getLine(line--) var curLine = doc.getLine(line--)
string = string == null ? curLine.slice(0, start.ch) : curLine + "\n" + string string = string == null ? curLine : curLine + "\n" + string
} }
chunk *= 2 chunkSize *= 2
var match = lastMatchIn(string, regexp) var match = lastMatchIn(string, regexp, endMargin)
if (match) { if (match) {
var before = string.slice(0, match.index).split("\n"), inside = match[0].split("\n") var before = string.slice(0, match.index).split("\n"), inside = match[0].split("\n")
var startLine = line + before.length, startCh = before[before.length - 1].length var startLine = line + before.length, startCh = before[before.length - 1].length

View File

@ -22,17 +22,21 @@
if (dir < 0 && start.ch == 0) return doc.clipPos(Pos(start.line - 1)); if (dir < 0 && start.ch == 0) return doc.clipPos(Pos(start.line - 1));
var line = doc.getLine(start.line); var line = doc.getLine(start.line);
if (dir > 0 && start.ch >= line.length) return doc.clipPos(Pos(start.line + 1, 0)); if (dir > 0 && start.ch >= line.length) return doc.clipPos(Pos(start.line + 1, 0));
var state = "start", type; var state = "start", type, startPos = start.ch;
for (var pos = start.ch, e = dir < 0 ? 0 : line.length, i = 0; pos != e; pos += dir, i++) { for (var pos = startPos, e = dir < 0 ? 0 : line.length, i = 0; pos != e; pos += dir, i++) {
var next = line.charAt(dir < 0 ? pos - 1 : pos); var next = line.charAt(dir < 0 ? pos - 1 : pos);
var cat = next != "_" && CodeMirror.isWordChar(next) ? "w" : "o"; var cat = next != "_" && CodeMirror.isWordChar(next) ? "w" : "o";
if (cat == "w" && next.toUpperCase() == next) cat = "W"; if (cat == "w" && next.toUpperCase() == next) cat = "W";
if (state == "start") { if (state == "start") {
if (cat != "o") { state = "in"; type = cat; } if (cat != "o") { state = "in"; type = cat; }
else startPos = pos + dir
} else if (state == "in") { } else if (state == "in") {
if (type != cat) { if (type != cat) {
if (type == "w" && cat == "W" && dir < 0) pos--; if (type == "w" && cat == "W" && dir < 0) pos--;
if (type == "W" && cat == "w" && dir > 0) { type = "w"; continue; } if (type == "W" && cat == "w" && dir > 0) { // From uppercase to lowercase
if (pos == startPos + 1) { type = "w"; continue; }
else pos--;
}
break; break;
} }
} }
@ -144,14 +148,24 @@
cur = cm.getSearchCursor(query, Pos(cm.firstLine(), 0)); cur = cm.getSearchCursor(query, Pos(cm.firstLine(), 0));
found = cur.findNext(); found = cur.findNext();
} }
if (!found || isSelectedRange(cm.listSelections(), cur.from(), cur.to())) if (!found || isSelectedRange(cm.listSelections(), cur.from(), cur.to())) return
return CodeMirror.Pass
cm.addSelection(cur.from(), cur.to()); cm.addSelection(cur.from(), cur.to());
} }
if (fullWord) if (fullWord)
cm.state.sublimeFindFullWord = cm.doc.sel; cm.state.sublimeFindFullWord = cm.doc.sel;
}; };
cmds.skipAndSelectNextOccurrence = function(cm) {
var prevAnchor = cm.getCursor("anchor"), prevHead = cm.getCursor("head");
cmds.selectNextOccurrence(cm);
if (CodeMirror.cmpPos(prevAnchor, prevHead) != 0) {
cm.doc.setSelections(cm.doc.listSelections()
.filter(function (sel) {
return sel.anchor != prevAnchor || sel.head != prevHead;
}));
}
}
function addCursorToSelection(cm, dir) { function addCursorToSelection(cm, dir) {
var ranges = cm.listSelections(), newRanges = []; var ranges = cm.listSelections(), newRanges = [];
for (var i = 0; i < ranges.length; i++) { for (var i = 0; i < ranges.length; i++) {
@ -175,7 +189,8 @@
function isSelectedRange(ranges, from, to) { function isSelectedRange(ranges, from, to) {
for (var i = 0; i < ranges.length; i++) for (var i = 0; i < ranges.length; i++)
if (ranges[i].from() == from && ranges[i].to() == to) return true if (CodeMirror.cmpPos(ranges[i].from(), from) == 0 &&
CodeMirror.cmpPos(ranges[i].to(), to) == 0) return true
return false return false
} }
@ -213,11 +228,15 @@
if (!selectBetweenBrackets(cm)) return CodeMirror.Pass; if (!selectBetweenBrackets(cm)) return CodeMirror.Pass;
}; };
function puncType(type) {
return !type ? null : /\bpunctuation\b/.test(type) ? type : undefined
}
cmds.goToBracket = function(cm) { cmds.goToBracket = function(cm) {
cm.extendSelectionsBy(function(range) { cm.extendSelectionsBy(function(range) {
var next = cm.scanForBracket(range.head, 1); var next = cm.scanForBracket(range.head, 1, puncType(cm.getTokenTypeAt(range.head)));
if (next && CodeMirror.cmpPos(next.pos, range.head) != 0) return next.pos; if (next && CodeMirror.cmpPos(next.pos, range.head) != 0) return next.pos;
var prev = cm.scanForBracket(range.head, -1); var prev = cm.scanForBracket(range.head, -1, puncType(cm.getTokenTypeAt(Pos(range.head.line, range.head.ch + 1))));
return prev && Pos(prev.pos.line, prev.pos.ch + 1) || range.head; return prev && Pos(prev.pos.line, prev.pos.ch + 1) || range.head;
}); });
}; };
@ -597,6 +616,7 @@
"Shift-Cmd-F2": "clearBookmarks", "Shift-Cmd-F2": "clearBookmarks",
"Alt-F2": "selectBookmarks", "Alt-F2": "selectBookmarks",
"Backspace": "smartBackspace", "Backspace": "smartBackspace",
"Cmd-K Cmd-D": "skipAndSelectNextOccurrence",
"Cmd-K Cmd-K": "delLineRight", "Cmd-K Cmd-K": "delLineRight",
"Cmd-K Cmd-U": "upcaseAtCursor", "Cmd-K Cmd-U": "upcaseAtCursor",
"Cmd-K Cmd-L": "downcaseAtCursor", "Cmd-K Cmd-L": "downcaseAtCursor",
@ -657,6 +677,7 @@
"Shift-Ctrl-F2": "clearBookmarks", "Shift-Ctrl-F2": "clearBookmarks",
"Alt-F2": "selectBookmarks", "Alt-F2": "selectBookmarks",
"Backspace": "smartBackspace", "Backspace": "smartBackspace",
"Ctrl-K Ctrl-D": "skipAndSelectNextOccurrence",
"Ctrl-K Ctrl-K": "delLineRight", "Ctrl-K Ctrl-K": "delLineRight",
"Ctrl-K Ctrl-U": "upcaseAtCursor", "Ctrl-K Ctrl-U": "upcaseAtCursor",
"Ctrl-K Ctrl-L": "downcaseAtCursor", "Ctrl-K Ctrl-L": "downcaseAtCursor",

View File

@ -164,7 +164,9 @@
{ keys: 'A', type: 'action', action: 'enterInsertMode', isEdit: true, actionArgs: { insertAt: 'eol' }, context: 'normal' }, { keys: 'A', type: 'action', action: 'enterInsertMode', isEdit: true, actionArgs: { insertAt: 'eol' }, context: 'normal' },
{ keys: 'A', type: 'action', action: 'enterInsertMode', isEdit: true, actionArgs: { insertAt: 'endOfSelectedArea' }, context: 'visual' }, { keys: 'A', type: 'action', action: 'enterInsertMode', isEdit: true, actionArgs: { insertAt: 'endOfSelectedArea' }, context: 'visual' },
{ keys: 'i', type: 'action', action: 'enterInsertMode', isEdit: true, actionArgs: { insertAt: 'inplace' }, context: 'normal' }, { keys: 'i', type: 'action', action: 'enterInsertMode', isEdit: true, actionArgs: { insertAt: 'inplace' }, context: 'normal' },
{ keys: 'gi', type: 'action', action: 'enterInsertMode', isEdit: true, actionArgs: { insertAt: 'lastEdit' }, context: 'normal' },
{ keys: 'I', type: 'action', action: 'enterInsertMode', isEdit: true, actionArgs: { insertAt: 'firstNonBlank'}, context: 'normal' }, { keys: 'I', type: 'action', action: 'enterInsertMode', isEdit: true, actionArgs: { insertAt: 'firstNonBlank'}, context: 'normal' },
{ keys: 'gI', type: 'action', action: 'enterInsertMode', isEdit: true, actionArgs: { insertAt: 'bol'}, context: 'normal' },
{ keys: 'I', type: 'action', action: 'enterInsertMode', isEdit: true, actionArgs: { insertAt: 'startOfSelectedArea' }, context: 'visual' }, { keys: 'I', type: 'action', action: 'enterInsertMode', isEdit: true, actionArgs: { insertAt: 'startOfSelectedArea' }, context: 'visual' },
{ keys: 'o', type: 'action', action: 'newLineAndEnterInsertMode', isEdit: true, interlaceInsertRepeat: true, actionArgs: { after: true }, context: 'normal' }, { keys: 'o', type: 'action', action: 'newLineAndEnterInsertMode', isEdit: true, interlaceInsertRepeat: true, actionArgs: { after: true }, context: 'normal' },
{ keys: 'O', type: 'action', action: 'newLineAndEnterInsertMode', isEdit: true, interlaceInsertRepeat: true, actionArgs: { after: false }, context: 'normal' }, { keys: 'O', type: 'action', action: 'newLineAndEnterInsertMode', isEdit: true, interlaceInsertRepeat: true, actionArgs: { after: false }, context: 'normal' },
@ -174,13 +176,15 @@
{ keys: '<C-q>', type: 'action', action: 'toggleVisualMode', actionArgs: { blockwise: true }}, { keys: '<C-q>', type: 'action', action: 'toggleVisualMode', actionArgs: { blockwise: true }},
{ keys: 'gv', type: 'action', action: 'reselectLastSelection' }, { keys: 'gv', type: 'action', action: 'reselectLastSelection' },
{ keys: 'J', type: 'action', action: 'joinLines', isEdit: true }, { keys: 'J', type: 'action', action: 'joinLines', isEdit: true },
{ keys: 'gJ', type: 'action', action: 'joinLines', actionArgs: { keepSpaces: true }, isEdit: true },
{ keys: 'p', type: 'action', action: 'paste', isEdit: true, actionArgs: { after: true, isEdit: true }}, { keys: 'p', type: 'action', action: 'paste', isEdit: true, actionArgs: { after: true, isEdit: true }},
{ keys: 'P', type: 'action', action: 'paste', isEdit: true, actionArgs: { after: false, isEdit: true }}, { keys: 'P', type: 'action', action: 'paste', isEdit: true, actionArgs: { after: false, isEdit: true }},
{ keys: 'r<character>', type: 'action', action: 'replace', isEdit: true }, { keys: 'r<character>', type: 'action', action: 'replace', isEdit: true },
{ keys: '@<character>', type: 'action', action: 'replayMacro' }, { keys: '@<character>', type: 'action', action: 'replayMacro' },
{ keys: 'q<character>', type: 'action', action: 'enterMacroRecordMode' }, { keys: 'q<character>', type: 'action', action: 'enterMacroRecordMode' },
// Handle Replace-mode as a special case of insert mode. // Handle Replace-mode as a special case of insert mode.
{ keys: 'R', type: 'action', action: 'enterInsertMode', isEdit: true, actionArgs: { replace: true }}, { keys: 'R', type: 'action', action: 'enterInsertMode', isEdit: true, actionArgs: { replace: true }, context: 'normal'},
{ keys: 'R', type: 'operator', operator: 'change', operatorArgs: { linewise: true, fullLine: true }, context: 'visual', exitVisualBlock: true},
{ keys: 'u', type: 'action', action: 'undo', context: 'normal' }, { keys: 'u', type: 'action', action: 'undo', context: 'normal' },
{ keys: 'u', type: 'operator', operator: 'changeCase', operatorArgs: {toLower: true}, context: 'visual', isEdit: true }, { keys: 'u', type: 'operator', operator: 'changeCase', operatorArgs: {toLower: true}, context: 'visual', isEdit: true },
{ keys: 'U', type: 'operator', operator: 'changeCase', operatorArgs: {toLower: false}, context: 'visual', isEdit: true }, { keys: 'U', type: 'operator', operator: 'changeCase', operatorArgs: {toLower: false}, context: 'visual', isEdit: true },
@ -594,9 +598,16 @@
} }
return mark; return mark;
} }
function find(cm, offset) {
var oldPointer = pointer;
var mark = move(cm, offset);
pointer = oldPointer;
return mark && mark.find();
}
return { return {
cachedCursor: undefined, //used for # and * jumps cachedCursor: undefined, //used for # and * jumps
add: add, add: add,
find: find,
move: move move: move
}; };
}; };
@ -1293,6 +1304,10 @@
} }
inputState.operator = command.operator; inputState.operator = command.operator;
inputState.operatorArgs = copyArgs(command.operatorArgs); inputState.operatorArgs = copyArgs(command.operatorArgs);
if (command.exitVisualBlock) {
vim.visualBlock = false;
updateCmSelection(cm);
}
if (vim.visualMode) { if (vim.visualMode) {
// Operating on a selection in visual mode. We don't need a motion. // Operating on a selection in visual mode. We don't need a motion.
this.evalInput(cm, vim); this.evalInput(cm, vim);
@ -1843,6 +1858,12 @@
var line = motionArgs.forward ? cur.line + repeat : cur.line - repeat; var line = motionArgs.forward ? cur.line + repeat : cur.line - repeat;
var first = cm.firstLine(); var first = cm.firstLine();
var last = cm.lastLine(); var last = cm.lastLine();
var posV = cm.findPosV(cur, (motionArgs.forward ? repeat : -repeat), 'line', vim.lastHSPos);
var hasMarkedText = motionArgs.forward ? posV.line > line : posV.line < line;
if (hasMarkedText) {
line = posV.line;
endCh = posV.ch;
}
// Vim go to line begin or line end when cursor at first/last line and // Vim go to line begin or line end when cursor at first/last line and
// move to previous/next line is triggered. // move to previous/next line is triggered.
if (line < first && cur.line == first){ if (line < first && cur.line == first){
@ -2098,9 +2119,9 @@
change: function(cm, args, ranges) { change: function(cm, args, ranges) {
var finalHead, text; var finalHead, text;
var vim = cm.state.vim; var vim = cm.state.vim;
if (!vim.visualMode) {
var anchor = ranges[0].anchor, var anchor = ranges[0].anchor,
head = ranges[0].head; head = ranges[0].head;
if (!vim.visualMode) {
text = cm.getRange(anchor, head); text = cm.getRange(anchor, head);
var lastState = vim.lastEditInputState || {}; var lastState = vim.lastEditInputState || {};
if (lastState.motion == "moveByWords" && !isWhiteSpaceString(text)) { if (lastState.motion == "moveByWords" && !isWhiteSpaceString(text)) {
@ -2128,6 +2149,13 @@
anchor.ch = Number.MAX_VALUE; anchor.ch = Number.MAX_VALUE;
} }
finalHead = anchor; finalHead = anchor;
} else if (args.fullLine) {
head.ch = Number.MAX_VALUE;
head.line--;
cm.setSelection(anchor, head)
text = cm.getSelection();
cm.replaceSelection("");
finalHead = anchor;
} else { } else {
text = cm.getSelection(); text = cm.getSelection();
var replacement = fillArray('', ranges.length); var replacement = fillArray('', ranges.length);
@ -2355,6 +2383,8 @@
var height = cm.listSelections().length; var height = cm.listSelections().length;
if (insertAt == 'eol') { if (insertAt == 'eol') {
head = Pos(head.line, lineLength(cm, head.line)); head = Pos(head.line, lineLength(cm, head.line));
} else if (insertAt == 'bol') {
head = Pos(head.line, 0);
} else if (insertAt == 'charAfter') { } else if (insertAt == 'charAfter') {
head = offsetCursor(head, 0, 1); head = offsetCursor(head, 0, 1);
} else if (insertAt == 'firstNonBlank') { } else if (insertAt == 'firstNonBlank') {
@ -2393,6 +2423,8 @@
if (vim.visualMode){ if (vim.visualMode){
return; return;
} }
} else if (insertAt == 'lastEdit') {
head = getLastEditPos(cm) || head;
} }
cm.setOption('disableInput', false); cm.setOption('disableInput', false);
if (actionArgs && actionArgs.replace) { if (actionArgs && actionArgs.replace) {
@ -2501,7 +2533,9 @@
var tmp = Pos(curStart.line + 1, var tmp = Pos(curStart.line + 1,
lineLength(cm, curStart.line + 1)); lineLength(cm, curStart.line + 1));
var text = cm.getRange(curStart, tmp); var text = cm.getRange(curStart, tmp);
text = text.replace(/\n\s*/g, ' '); text = actionArgs.keepSpaces
? text.replace(/\n\r?/g, '')
: text.replace(/\n\s*/g, ' ');
cm.replaceRange(text, curStart, tmp); cm.replaceRange(text, curStart, tmp);
} }
var curFinalPos = Pos(curStart.line, finalCh); var curFinalPos = Pos(curStart.line, finalCh);
@ -4318,25 +4352,25 @@
} }
function getMarkPos(cm, vim, markName) { function getMarkPos(cm, vim, markName) {
if (markName == '\'') { if (markName == '\'' || markName == '`') {
var history = cm.doc.history.done; return vimGlobalState.jumpList.find(cm, -1) || Pos(0, 0);
var event = history[history.length - 2];
return event && event.ranges && event.ranges[0].head;
} else if (markName == '.') { } else if (markName == '.') {
if (cm.doc.history.lastModTime == 0) { return getLastEditPos(cm);
return // If no changes, bail out; don't bother to copy or reverse history array.
} else {
var changeHistory = cm.doc.history.done.filter(function(el){ if (el.changes !== undefined) { return el } });
changeHistory.reverse();
var lastEditPos = changeHistory[0].changes[0].to;
}
return lastEditPos;
} }
var mark = vim.marks[markName]; var mark = vim.marks[markName];
return mark && mark.find(); return mark && mark.find();
} }
function getLastEditPos(cm) {
var done = cm.doc.history.done;
for (var i = done.length; i--;) {
if (done[i].changes) {
return copyCursor(done[i].changes[0].to);
}
}
}
var ExCommandDispatcher = function() { var ExCommandDispatcher = function() {
this.buildCommandMap_(); this.buildCommandMap_();
}; };

File diff suppressed because it is too large Load Diff

View File

@ -101,6 +101,9 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
} else if (ch == "#") { } else if (ch == "#") {
stream.skipToEnd(); stream.skipToEnd();
return ret("error", "error"); return ret("error", "error");
} else if (ch == "<" && stream.match("!--") || ch == "-" && stream.match("->")) {
stream.skipToEnd()
return ret("comment", "comment")
} else if (isOperatorChar.test(ch)) { } else if (isOperatorChar.test(ch)) {
if (ch != ">" || !state.lexical || state.lexical.type != ">") { if (ch != ">" || !state.lexical || state.lexical.type != ">") {
if (stream.eat("=")) { if (stream.eat("=")) {

42
vendor/codemirror/theme/ayu-dark.css vendored Normal file
View File

@ -0,0 +1,42 @@
/* Based on https://github.com/dempfi/ayu */
.cm-s-ayu-dark.CodeMirror { background: #0a0e14; color: #b3b1ad; }
.cm-s-ayu-dark div.CodeMirror-selected { background: #273747; }
.cm-s-ayu-dark .CodeMirror-line::selection, .cm-s-ayu-dark .CodeMirror-line > span::selection, .cm-s-ayu-dark .CodeMirror-line > span > span::selection { background: rgba(39, 55, 71, 99); }
.cm-s-ayu-dark .CodeMirror-line::-moz-selection, .cm-s-ayu-dark .CodeMirror-line > span::-moz-selection, .cm-s-ayu-dark .CodeMirror-line > span > span::-moz-selection { background: rgba(39, 55, 71, 99); }
.cm-s-ayu-dark .CodeMirror-gutters { background: #0a0e14; border-right: 0px; }
.cm-s-ayu-dark .CodeMirror-guttermarker { color: white; }
.cm-s-ayu-dark .CodeMirror-guttermarker-subtle { color: #3d424d; }
.cm-s-ayu-dark .CodeMirror-linenumber { color: #3d424d; }
.cm-s-ayu-dark .CodeMirror-cursor { border-left: 1px solid #e6b450; }
.cm-s-ayu-dark span.cm-comment { color: #626a73; }
.cm-s-ayu-dark span.cm-atom { color: #ae81ff; }
.cm-s-ayu-dark span.cm-number { color: #e6b450; }
.cm-s-ayu-dark span.cm-comment.cm-attribute { color: #ffb454; }
.cm-s-ayu-dark span.cm-comment.cm-def { color: rgba(57, 186, 230, 80); }
.cm-s-ayu-dark span.cm-comment.cm-tag { color: #39bae6; }
.cm-s-ayu-dark span.cm-comment.cm-type { color: #5998a6; }
.cm-s-ayu-dark span.cm-property, .cm-s-ayu-dark span.cm-attribute { color: #ffb454; }
.cm-s-ayu-dark span.cm-keyword { color: #ff8f40; }
.cm-s-ayu-dark span.cm-builtin { color: #e6b450; }
.cm-s-ayu-dark span.cm-string { color: #c2d94c; }
.cm-s-ayu-dark span.cm-variable { color: #b3b1ad; }
.cm-s-ayu-dark span.cm-variable-2 { color: #f07178; }
.cm-s-ayu-dark span.cm-variable-3 { color: #39bae6; }
.cm-s-ayu-dark span.cm-type { color: #ff8f40; }
.cm-s-ayu-dark span.cm-def { color: #ffee99; }
.cm-s-ayu-dark span.cm-bracket { color: #f8f8f2; }
.cm-s-ayu-dark span.cm-tag { color: rgba(57, 186, 230, 80); }
.cm-s-ayu-dark span.cm-header { color: #c2d94c; }
.cm-s-ayu-dark span.cm-link { color: #39bae6; }
.cm-s-ayu-dark span.cm-error { color: #ff3333; }
.cm-s-ayu-dark .CodeMirror-activeline-background { background: #01060e; }
.cm-s-ayu-dark .CodeMirror-matchingbracket {
text-decoration: underline;
color: white !important;
}

43
vendor/codemirror/theme/ayu-mirage.css vendored Normal file
View File

@ -0,0 +1,43 @@
/* Based on https://github.com/dempfi/ayu */
.cm-s-ayu-mirage.CodeMirror { background: #1f2430; color: #cbccc6; }
.cm-s-ayu-mirage div.CodeMirror-selected { background: #34455a; }
.cm-s-ayu-mirage .CodeMirror-line::selection, .cm-s-ayu-mirage .CodeMirror-line > span::selection, .cm-s-ayu-mirage .CodeMirror-line > span > span::selection { background: #34455a; }
.cm-s-ayu-mirage .CodeMirror-line::-moz-selection, .cm-s-ayu-mirage .CodeMirror-line > span::-moz-selection, .cm-s-ayu-mirage .CodeMirror-line > span > span::-moz-selection { background: rgba(25, 30, 42, 99); }
.cm-s-ayu-mirage .CodeMirror-gutters { background: #1f2430; border-right: 0px; }
.cm-s-ayu-mirage .CodeMirror-guttermarker { color: white; }
.cm-s-ayu-mirage .CodeMirror-guttermarker-subtle { color: rgba(112, 122, 140, 66); }
.cm-s-ayu-mirage .CodeMirror-linenumber { color: rgba(61, 66, 77, 99); }
.cm-s-ayu-mirage .CodeMirror-cursor { border-left: 1px solid #ffcc66; }
.cm-s-ayu-mirage span.cm-comment { color: #5c6773; font-style:italic; }
.cm-s-ayu-mirage span.cm-atom { color: #ae81ff; }
.cm-s-ayu-mirage span.cm-number { color: #ffcc66; }
.cm-s-ayu-mirage span.cm-comment.cm-attribute { color: #ffd580; }
.cm-s-ayu-mirage span.cm-comment.cm-def { color: #d4bfff; }
.cm-s-ayu-mirage span.cm-comment.cm-tag { color: #5ccfe6; }
.cm-s-ayu-mirage span.cm-comment.cm-type { color: #5998a6; }
.cm-s-ayu-mirage span.cm-property { color: #f29e74; }
.cm-s-ayu-mirage span.cm-attribute { color: #ffd580; }
.cm-s-ayu-mirage span.cm-keyword { color: #ffa759; }
.cm-s-ayu-mirage span.cm-builtin { color: #ffcc66; }
.cm-s-ayu-mirage span.cm-string { color: #bae67e; }
.cm-s-ayu-mirage span.cm-variable { color: #cbccc6; }
.cm-s-ayu-mirage span.cm-variable-2 { color: #f28779; }
.cm-s-ayu-mirage span.cm-variable-3 { color: #5ccfe6; }
.cm-s-ayu-mirage span.cm-type { color: #ffa759; }
.cm-s-ayu-mirage span.cm-def { color: #ffd580; }
.cm-s-ayu-mirage span.cm-bracket { color: rgba(92, 207, 230, 80); }
.cm-s-ayu-mirage span.cm-tag { color: #5ccfe6; }
.cm-s-ayu-mirage span.cm-header { color: #bae67e; }
.cm-s-ayu-mirage span.cm-link { color: #5ccfe6; }
.cm-s-ayu-mirage span.cm-error { color: #ff3333; }
.cm-s-ayu-mirage .CodeMirror-activeline-background { background: #191e2a; }
.cm-s-ayu-mirage .CodeMirror-matchingbracket {
text-decoration: underline;
color: white !important;
}

View File

@ -28,6 +28,8 @@
.cm-s-darcula span.cm-bracket { color: #A9B7C6; } .cm-s-darcula span.cm-bracket { color: #A9B7C6; }
.cm-s-darcula span.cm-builtin { color: #FF9E59; } .cm-s-darcula span.cm-builtin { color: #FF9E59; }
.cm-s-darcula span.cm-special { color: #FF9E59; } .cm-s-darcula span.cm-special { color: #FF9E59; }
.cm-s-darcula span.cm-matchhighlight { color: #FFFFFF; background-color: rgba(50, 89, 48, .7); font-weight: normal;}
.cm-s-darcula span.cm-searching { color: #FFFFFF; background-color: rgba(61, 115, 59, .7); font-weight: normal;}
.cm-s-darcula .CodeMirror-cursor { border-left: 1px solid #A9B7C6; } .cm-s-darcula .CodeMirror-cursor { border-left: 1px solid #A9B7C6; }
.cm-s-darcula .CodeMirror-activeline-background { background: #323232; } .cm-s-darcula .CodeMirror-activeline-background { background: #323232; }

View File

@ -0,0 +1,135 @@
/*
Name: material
Author: Mattia Astorino (http://github.com/equinusocio)
Website: https://material-theme.site/
*/
.cm-s-material-darker.CodeMirror {
background-color: #212121;
color: #EEFFFF;
}
.cm-s-material-darker .CodeMirror-gutters {
background: #212121;
color: #545454;
border: none;
}
.cm-s-material-darker .CodeMirror-guttermarker,
.cm-s-material-darker .CodeMirror-guttermarker-subtle,
.cm-s-material-darker .CodeMirror-linenumber {
color: #545454;
}
.cm-s-material-darker .CodeMirror-cursor {
border-left: 1px solid #FFCC00;
}
.cm-s-material-darker div.CodeMirror-selected {
background: rgba(97, 97, 97, 0.2);
}
.cm-s-material-darker.CodeMirror-focused div.CodeMirror-selected {
background: rgba(97, 97, 97, 0.2);
}
.cm-s-material-darker .CodeMirror-line::selection,
.cm-s-material-darker .CodeMirror-line>span::selection,
.cm-s-material-darker .CodeMirror-line>span>span::selection {
background: rgba(128, 203, 196, 0.2);
}
.cm-s-material-darker .CodeMirror-line::-moz-selection,
.cm-s-material-darker .CodeMirror-line>span::-moz-selection,
.cm-s-material-darker .CodeMirror-line>span>span::-moz-selection {
background: rgba(128, 203, 196, 0.2);
}
.cm-s-material-darker .CodeMirror-activeline-background {
background: rgba(0, 0, 0, 0.5);
}
.cm-s-material-darker .cm-keyword {
color: #C792EA;
}
.cm-s-material-darker .cm-operator {
color: #89DDFF;
}
.cm-s-material-darker .cm-variable-2 {
color: #EEFFFF;
}
.cm-s-material-darker .cm-variable-3,
.cm-s-material-darker .cm-type {
color: #f07178;
}
.cm-s-material-darker .cm-builtin {
color: #FFCB6B;
}
.cm-s-material-darker .cm-atom {
color: #F78C6C;
}
.cm-s-material-darker .cm-number {
color: #FF5370;
}
.cm-s-material-darker .cm-def {
color: #82AAFF;
}
.cm-s-material-darker .cm-string {
color: #C3E88D;
}
.cm-s-material-darker .cm-string-2 {
color: #f07178;
}
.cm-s-material-darker .cm-comment {
color: #545454;
}
.cm-s-material-darker .cm-variable {
color: #f07178;
}
.cm-s-material-darker .cm-tag {
color: #FF5370;
}
.cm-s-material-darker .cm-meta {
color: #FFCB6B;
}
.cm-s-material-darker .cm-attribute {
color: #C792EA;
}
.cm-s-material-darker .cm-property {
color: #C792EA;
}
.cm-s-material-darker .cm-qualifier {
color: #DECB6B;
}
.cm-s-material-darker .cm-variable-3,
.cm-s-material-darker .cm-type {
color: #DECB6B;
}
.cm-s-material-darker .cm-error {
color: rgba(255, 255, 255, 1.0);
background-color: #FF5370;
}
.cm-s-material-darker .CodeMirror-matchingbracket {
text-decoration: underline;
color: white !important;
}

View File

@ -0,0 +1,135 @@
/*
Name: material
Author: Mattia Astorino (http://github.com/equinusocio)
Website: https://material-theme.site/
*/
.cm-s-material-ocean.CodeMirror {
background-color: #0F111A;
color: #8F93A2;
}
.cm-s-material-ocean .CodeMirror-gutters {
background: #0F111A;
color: #464B5D;
border: none;
}
.cm-s-material-ocean .CodeMirror-guttermarker,
.cm-s-material-ocean .CodeMirror-guttermarker-subtle,
.cm-s-material-ocean .CodeMirror-linenumber {
color: #464B5D;
}
.cm-s-material-ocean .CodeMirror-cursor {
border-left: 1px solid #FFCC00;
}
.cm-s-material-ocean div.CodeMirror-selected {
background: rgba(113, 124, 180, 0.2);
}
.cm-s-material-ocean.CodeMirror-focused div.CodeMirror-selected {
background: rgba(113, 124, 180, 0.2);
}
.cm-s-material-ocean .CodeMirror-line::selection,
.cm-s-material-ocean .CodeMirror-line>span::selection,
.cm-s-material-ocean .CodeMirror-line>span>span::selection {
background: rgba(128, 203, 196, 0.2);
}
.cm-s-material-ocean .CodeMirror-line::-moz-selection,
.cm-s-material-ocean .CodeMirror-line>span::-moz-selection,
.cm-s-material-ocean .CodeMirror-line>span>span::-moz-selection {
background: rgba(128, 203, 196, 0.2);
}
.cm-s-material-ocean .CodeMirror-activeline-background {
background: rgba(0, 0, 0, 0.5);
}
.cm-s-material-ocean .cm-keyword {
color: #C792EA;
}
.cm-s-material-ocean .cm-operator {
color: #89DDFF;
}
.cm-s-material-ocean .cm-variable-2 {
color: #EEFFFF;
}
.cm-s-material-ocean .cm-variable-3,
.cm-s-material-ocean .cm-type {
color: #f07178;
}
.cm-s-material-ocean .cm-builtin {
color: #FFCB6B;
}
.cm-s-material-ocean .cm-atom {
color: #F78C6C;
}
.cm-s-material-ocean .cm-number {
color: #FF5370;
}
.cm-s-material-ocean .cm-def {
color: #82AAFF;
}
.cm-s-material-ocean .cm-string {
color: #C3E88D;
}
.cm-s-material-ocean .cm-string-2 {
color: #f07178;
}
.cm-s-material-ocean .cm-comment {
color: #464B5D;
}
.cm-s-material-ocean .cm-variable {
color: #f07178;
}
.cm-s-material-ocean .cm-tag {
color: #FF5370;
}
.cm-s-material-ocean .cm-meta {
color: #FFCB6B;
}
.cm-s-material-ocean .cm-attribute {
color: #C792EA;
}
.cm-s-material-ocean .cm-property {
color: #C792EA;
}
.cm-s-material-ocean .cm-qualifier {
color: #DECB6B;
}
.cm-s-material-ocean .cm-variable-3,
.cm-s-material-ocean .cm-type {
color: #DECB6B;
}
.cm-s-material-ocean .cm-error {
color: rgba(255, 255, 255, 1.0);
background-color: #FF5370;
}
.cm-s-material-ocean .CodeMirror-matchingbracket {
text-decoration: underline;
color: white !important;
}

View File

@ -0,0 +1,135 @@
/*
Name: material
Author: Mattia Astorino (http://github.com/equinusocio)
Website: https://material-theme.site/
*/
.cm-s-material-palenight.CodeMirror {
background-color: #292D3E;
color: #A6ACCD;
}
.cm-s-material-palenight .CodeMirror-gutters {
background: #292D3E;
color: #676E95;
border: none;
}
.cm-s-material-palenight .CodeMirror-guttermarker,
.cm-s-material-palenight .CodeMirror-guttermarker-subtle,
.cm-s-material-palenight .CodeMirror-linenumber {
color: #676E95;
}
.cm-s-material-palenight .CodeMirror-cursor {
border-left: 1px solid #FFCC00;
}
.cm-s-material-palenight div.CodeMirror-selected {
background: rgba(113, 124, 180, 0.2);
}
.cm-s-material-palenight.CodeMirror-focused div.CodeMirror-selected {
background: rgba(113, 124, 180, 0.2);
}
.cm-s-material-palenight .CodeMirror-line::selection,
.cm-s-material-palenight .CodeMirror-line>span::selection,
.cm-s-material-palenight .CodeMirror-line>span>span::selection {
background: rgba(128, 203, 196, 0.2);
}
.cm-s-material-palenight .CodeMirror-line::-moz-selection,
.cm-s-material-palenight .CodeMirror-line>span::-moz-selection,
.cm-s-material-palenight .CodeMirror-line>span>span::-moz-selection {
background: rgba(128, 203, 196, 0.2);
}
.cm-s-material-palenight .CodeMirror-activeline-background {
background: rgba(0, 0, 0, 0.5);
}
.cm-s-material-palenight .cm-keyword {
color: #C792EA;
}
.cm-s-material-palenight .cm-operator {
color: #89DDFF;
}
.cm-s-material-palenight .cm-variable-2 {
color: #EEFFFF;
}
.cm-s-material-palenight .cm-variable-3,
.cm-s-material-palenight .cm-type {
color: #f07178;
}
.cm-s-material-palenight .cm-builtin {
color: #FFCB6B;
}
.cm-s-material-palenight .cm-atom {
color: #F78C6C;
}
.cm-s-material-palenight .cm-number {
color: #FF5370;
}
.cm-s-material-palenight .cm-def {
color: #82AAFF;
}
.cm-s-material-palenight .cm-string {
color: #C3E88D;
}
.cm-s-material-palenight .cm-string-2 {
color: #f07178;
}
.cm-s-material-palenight .cm-comment {
color: #676E95;
}
.cm-s-material-palenight .cm-variable {
color: #f07178;
}
.cm-s-material-palenight .cm-tag {
color: #FF5370;
}
.cm-s-material-palenight .cm-meta {
color: #FFCB6B;
}
.cm-s-material-palenight .cm-attribute {
color: #C792EA;
}
.cm-s-material-palenight .cm-property {
color: #C792EA;
}
.cm-s-material-palenight .cm-qualifier {
color: #DECB6B;
}
.cm-s-material-palenight .cm-variable-3,
.cm-s-material-palenight .cm-type {
color: #DECB6B;
}
.cm-s-material-palenight .cm-error {
color: rgba(255, 255, 255, 1.0);
background-color: #FF5370;
}
.cm-s-material-palenight .CodeMirror-matchingbracket {
text-decoration: underline;
color: white !important;
}

View File

@ -1,52 +1,134 @@
/* /*
Name: material Name: material
Author: Michael Kaminsky (http://github.com/mkaminsky11) Author: Mattia Astorino (http://github.com/equinusocio)
Website: https://material-theme.site/
Original material color scheme by Mattia Astorino (https://github.com/equinusocio/material-theme)
*/ */
.cm-s-material.CodeMirror { .cm-s-material.CodeMirror {
background-color: #263238; background-color: #263238;
color: rgba(233, 237, 237, 1); color: #EEFFFF;
} }
.cm-s-material .CodeMirror-gutters { .cm-s-material .CodeMirror-gutters {
background: #263238; background: #263238;
color: rgb(83,127,126); color: #546E7A;
border: none; border: none;
} }
.cm-s-material .CodeMirror-guttermarker, .cm-s-material .CodeMirror-guttermarker-subtle, .cm-s-material .CodeMirror-linenumber { color: rgb(83,127,126); }
.cm-s-material .CodeMirror-cursor { border-left: 1px solid #f8f8f0; }
.cm-s-material div.CodeMirror-selected { background: rgba(255, 255, 255, 0.15); }
.cm-s-material.CodeMirror-focused div.CodeMirror-selected { background: rgba(255, 255, 255, 0.10); }
.cm-s-material .CodeMirror-line::selection, .cm-s-material .CodeMirror-line > span::selection, .cm-s-material .CodeMirror-line > span > span::selection { background: rgba(255, 255, 255, 0.10); }
.cm-s-material .CodeMirror-line::-moz-selection, .cm-s-material .CodeMirror-line > span::-moz-selection, .cm-s-material .CodeMirror-line > span > span::-moz-selection { background: rgba(255, 255, 255, 0.10); }
.cm-s-material .CodeMirror-activeline-background { background: rgba(0, 0, 0, 0); } .cm-s-material .CodeMirror-guttermarker,
.cm-s-material .cm-keyword { color: rgba(199, 146, 234, 1); } .cm-s-material .CodeMirror-guttermarker-subtle,
.cm-s-material .cm-operator { color: rgba(233, 237, 237, 1); } .cm-s-material .CodeMirror-linenumber {
.cm-s-material .cm-variable-2 { color: #80CBC4; } color: #546E7A;
.cm-s-material .cm-variable-3, .cm-s-material .cm-type { color: #82B1FF; } }
.cm-s-material .cm-builtin { color: #DECB6B; }
.cm-s-material .cm-atom { color: #F77669; } .cm-s-material .CodeMirror-cursor {
.cm-s-material .cm-number { color: #F77669; } border-left: 1px solid #FFCC00;
.cm-s-material .cm-def { color: rgba(233, 237, 237, 1); } }
.cm-s-material .cm-string { color: #C3E88D; }
.cm-s-material .cm-string-2 { color: #80CBC4; } .cm-s-material div.CodeMirror-selected {
.cm-s-material .cm-comment { color: #546E7A; } background: rgba(128, 203, 196, 0.2);
.cm-s-material .cm-variable { color: #82B1FF; } }
.cm-s-material .cm-tag { color: #80CBC4; }
.cm-s-material .cm-meta { color: #80CBC4; } .cm-s-material.CodeMirror-focused div.CodeMirror-selected {
.cm-s-material .cm-attribute { color: #FFCB6B; } background: rgba(128, 203, 196, 0.2);
.cm-s-material .cm-property { color: #80CBAE; } }
.cm-s-material .cm-qualifier { color: #DECB6B; }
.cm-s-material .cm-variable-3, .cm-s-material .cm-type { color: #DECB6B; } .cm-s-material .CodeMirror-line::selection,
.cm-s-material .cm-tag { color: rgba(255, 83, 112, 1); } .cm-s-material .CodeMirror-line>span::selection,
.cm-s-material .CodeMirror-line>span>span::selection {
background: rgba(128, 203, 196, 0.2);
}
.cm-s-material .CodeMirror-line::-moz-selection,
.cm-s-material .CodeMirror-line>span::-moz-selection,
.cm-s-material .CodeMirror-line>span>span::-moz-selection {
background: rgba(128, 203, 196, 0.2);
}
.cm-s-material .CodeMirror-activeline-background {
background: rgba(0, 0, 0, 0.5);
}
.cm-s-material .cm-keyword {
color: #C792EA;
}
.cm-s-material .cm-operator {
color: #89DDFF;
}
.cm-s-material .cm-variable-2 {
color: #EEFFFF;
}
.cm-s-material .cm-variable-3,
.cm-s-material .cm-type {
color: #f07178;
}
.cm-s-material .cm-builtin {
color: #FFCB6B;
}
.cm-s-material .cm-atom {
color: #F78C6C;
}
.cm-s-material .cm-number {
color: #FF5370;
}
.cm-s-material .cm-def {
color: #82AAFF;
}
.cm-s-material .cm-string {
color: #C3E88D;
}
.cm-s-material .cm-string-2 {
color: #f07178;
}
.cm-s-material .cm-comment {
color: #546E7A;
}
.cm-s-material .cm-variable {
color: #f07178;
}
.cm-s-material .cm-tag {
color: #FF5370;
}
.cm-s-material .cm-meta {
color: #FFCB6B;
}
.cm-s-material .cm-attribute {
color: #C792EA;
}
.cm-s-material .cm-property {
color: #C792EA;
}
.cm-s-material .cm-qualifier {
color: #DECB6B;
}
.cm-s-material .cm-variable-3,
.cm-s-material .cm-type {
color: #DECB6B;
}
.cm-s-material .cm-error { .cm-s-material .cm-error {
color: rgba(255, 255, 255, 1.0); color: rgba(255, 255, 255, 1.0);
background-color: #EC5F67; background-color: #FF5370;
} }
.cm-s-material .CodeMirror-matchingbracket { .cm-s-material .CodeMirror-matchingbracket {
text-decoration: underline; text-decoration: underline;
color: white !important; color: white !important;

143
vendor/codemirror/theme/moxer.css vendored Normal file
View File

@ -0,0 +1,143 @@
/*
Name: Moxer Theme
Author: Mattia Astorino (http://github.com/equinusocio)
Website: https://github.com/moxer-theme/moxer-code
*/
.cm-s-moxer.CodeMirror {
background-color: #090A0F;
color: #8E95B4;
line-height: 1.8;
}
.cm-s-moxer .CodeMirror-gutters {
background: #090A0F;
color: #35394B;
border: none;
}
.cm-s-moxer .CodeMirror-guttermarker,
.cm-s-moxer .CodeMirror-guttermarker-subtle,
.cm-s-moxer .CodeMirror-linenumber {
color: #35394B;
}
.cm-s-moxer .CodeMirror-cursor {
border-left: 1px solid #FFCC00;
}
.cm-s-moxer div.CodeMirror-selected {
background: rgba(128, 203, 196, 0.2);
}
.cm-s-moxer.CodeMirror-focused div.CodeMirror-selected {
background: #212431;
}
.cm-s-moxer .CodeMirror-line::selection,
.cm-s-moxer .CodeMirror-line>span::selection,
.cm-s-moxer .CodeMirror-line>span>span::selection {
background: #212431;
}
.cm-s-moxer .CodeMirror-line::-moz-selection,
.cm-s-moxer .CodeMirror-line>span::-moz-selection,
.cm-s-moxer .CodeMirror-line>span>span::-moz-selection {
background: #212431;
}
.cm-s-moxer .CodeMirror-activeline-background,
.cm-s-moxer .CodeMirror-activeline-gutter .CodeMirror-linenumber {
background: rgba(33, 36, 49, 0.5);
}
.cm-s-moxer .cm-keyword {
color: #D46C6C;
}
.cm-s-moxer .cm-operator {
color: #D46C6C;
}
.cm-s-moxer .cm-variable-2 {
color: #81C5DA;
}
.cm-s-moxer .cm-variable-3,
.cm-s-moxer .cm-type {
color: #f07178;
}
.cm-s-moxer .cm-builtin {
color: #FFCB6B;
}
.cm-s-moxer .cm-atom {
color: #A99BE2;
}
.cm-s-moxer .cm-number {
color: #7CA4C0;
}
.cm-s-moxer .cm-def {
color: #F5DFA5;
}
.cm-s-moxer .CodeMirror-line .cm-def ~ .cm-def {
color: #81C5DA;
}
.cm-s-moxer .cm-string {
color: #B2E4AE;
}
.cm-s-moxer .cm-string-2 {
color: #f07178;
}
.cm-s-moxer .cm-comment {
color: #3F445A;
}
.cm-s-moxer .cm-variable {
color: #8E95B4;
}
.cm-s-moxer .cm-tag {
color: #FF5370;
}
.cm-s-moxer .cm-meta {
color: #FFCB6B;
}
.cm-s-moxer .cm-attribute {
color: #C792EA;
}
.cm-s-moxer .cm-property {
color: #81C5DA;
}
.cm-s-moxer .cm-qualifier {
color: #DECB6B;
}
.cm-s-moxer .cm-variable-3,
.cm-s-moxer .cm-type {
color: #DECB6B;
}
.cm-s-moxer .cm-error {
color: rgba(255, 255, 255, 1.0);
background-color: #FF5370;
}
.cm-s-moxer .CodeMirror-matchingbracket {
text-decoration: underline;
color: white !important;
}