• /home/barbar84/www/wp-inclu.../js/codemirr...
• File: codemirror.min.js
• Dòng [
16/
28]:
d.push({head:h,anchor:h}),e=g.line+1}}b.setSelections(d)}),void b.execCommand("indentAuto"))}function e(b,c){for(var d=c.ch,e=d,f=b.getLine(c.line);d&&a.isWordChar(f.charAt(d-1));)--d;for(;e<f.length&&a.isWordChar(f.charAt(e));)++e;return{from:o(c.line,d),to:o(c.line,e),word:f.slice(d,e)}}function f(a,b){for(var c=a.listSelections(),d=[],e=0;e<c.length;e++){var f=c[e],g=a.findPosV(f.anchor,b,"line"),h=a.findPosV(f.head,b,"line"),i={anchor:g,head:h};d.push(f),d.push(i)}a.setSelections(d)}function g(a,b,c){for(var d=0;d<a.length;d++)if(a[d].from()==b&&a[d].to()==c)return!0;return!1}function h(a){for(var b=a.listSelections(),c=[],d=0;d<b.length;d++){var e=b[d],f=e.head,g=a.scanForBracket(f,-1);if(!g)return!1;for(;;){var h=a.scanForBracket(f,1);if(!h)return!1;if(h.ch==u.charAt(u.indexOf(g.ch)+1)){c.push({anchor:o(g.pos.line,g.pos.ch+1),head:h.pos});break}f=o(h.pos.line,h.pos.ch+1)}}return a.setSelections(c),!0}function i(b,c){if(b.isReadOnly())return a.Pass;for(var d,e=b.listSelections(),f=[],g=0;g<e.length;g++){var h=e[g];if(!h.empty()){for(var i=h.from().line,j=h.to().line;g<e.length-1&&e[g+1].from().line==j;)j=e[++g].to().line;e[g].to().ch||j--,f.push(i,j)}}f.length?d=!0:f.push(b.firstLine(),b.lastLine()),b.operation(function(){for(var a=[],e=0;e<f.length;e+=2){var g=f[e],h=f[e+1],i=o(g,0),j=o(h),k=b.getRange(i,j,!1);c?k.sort():k.sort(function(a,b){var c=a.toUpperCase(),d=b.toUpperCase();return c!=d&&(a=c,b=d),a<b?-1:a==b?0:1}),b.replaceRange(k,i,j),d&&a.push({anchor:i,head:o(h+1,0)})}d&&b.setSelections(a,0)})}function j(b,c){b.operation(function(){for(var d=b.listSelections(),f=[],g=[],h=0;h<d.length;h++){var i=d[h];i.empty()?(f.push(h),g.push("")):g.push(c(b.getRange(i.from(),i.to())))}b.replaceSelections(g,"around","case");for(var j,h=f.length-1;h>=0;h--){var i=d[f[h]];if(!(j&&a.cmpPos(i.head,j)>0)){var k=e(b,i.head);j=k.from,b.replaceRange(c(k.word),k.from,k.to)}}})}function k(b){var c=b.getCursor("from"),d=b.getCursor("to");if(0==a.cmpPos(c,d)){var f=e(b,c);if(!f.word)return;c=f.from,d=f.to}return{from:c,to:d,query:b.getRange(c,d),word:f}}function l(a,b){var c=k(a);if(c){var d=c.query,e=a.getSearchCursor(d,b?c.to:c.from);(b?e.findNext():e.findPrevious())?a.setSelection(e.from(),e.to()):(e=a.getSearchCursor(d,b?o(a.firstLine(),0):a.clipPos(o(a.lastLine()))),(b?e.findNext():e.findPrevious())?a.setSelection(e.from(),e.to()):c.word&&a.setSelection(c.from,c.to))}}var m=a.keyMap.sublime={fallthrough:"default"},n=a.commands,o=a.Pos,p=a.keyMap["default"]==a.keyMap.macDefault,q=p?"Cmd-":"Ctrl-",r=p?"Ctrl-":"Alt-";n[m[r+"Left"]="goSubwordLeft"]=function(a){c(a,-1)},n[m[r+"Right"]="goSubwordRight"]=function(a){c(a,1)},p&&(m["Cmd-Left"]="goLineStartSmart");var s=p?"Ctrl-Alt-":"Ctrl-";n[m[s+"Up"]="scrollLineUp"]=function(a){var b=a.getScrollInfo();if(!a.somethingSelected()){var c=a.lineAtHeight(b.top+b.clientHeight,"local");a.getCursor().line>=c&&a.execCommand("goLineUp")}a.scrollTo(null,b.top-a.defaultTextHeight())},n[m[s+"Down"]="scrollLineDown"]=function(a){var b=a.getScrollInfo();if(!a.somethingSelected()){var c=a.lineAtHeight(b.top,"local")+1;a.getCursor().line<=c&&a.execCommand("goLineDown")}a.scrollTo(null,b.top+a.defaultTextHeight())},n[m["Shift-"+q+"L"]="splitSelectionByLine"]=function(a){for(var b=a.listSelections(),c=[],d=0;d<b.length;d++)for(var e=b[d].from(),f=b[d].to(),g=e.line;g<=f.line;++g)f.line>e.line&&g==f.line&&0==f.ch||c.push({anchor:g==e.line?e:o(g,0),head:g==f.line?f:o(g)});a.setSelections(c,0)},m["Shift-Tab"]="indentLess",n[m.Esc="singleSelectionTop"]=function(a){var b=a.listSelections()[0];a.setSelection(b.anchor,b.head,{scroll:!1})},n[m[q+"L"]="selectLine"]=function(a){for(var b=a.listSelections(),c=[],d=0;d<b.length;d++){var e=b[d];c.push({anchor:o(e.from().line,0),head:o(e.to().line+1,0)})}a.setSelections(c)},m["Shift-Ctrl-K"]="deleteLine",n[m[q+"Enter"]="insertLineAfter"]=function(a){return d(a,!1)},n[m["Shift-"+q+"Enter"]="insertLineBefore"]=function(a){return d(a,!0)},n[m[q+"D"]="selectNextOccurrence"]=function(b){var c=b.getCursor("from"),d=b.getCursor("to"),f=b.state.sublimeFindFullWord==b.doc.sel;if(0==a.cmpPos(c,d)){var h=e(b,c);if(!h.word)return;b.setSelection(h.from,h.to),f=!0}else{var i=b.getRange(c,d),j=f?new RegExp("\\b"+i+"\\b"):i,k=b.getSearchCursor(j,d),l=k.findNext();if(l||(k=b.getSearchCursor(j,o(b.firstLine(),0)),l=k.findNext()),!l||g(b.listSelections(),k.from(),k.to()))return a.Pass;b.addSelection(k.from(),k.to())}f&&(b.state.sublimeFindFullWord=b.doc.sel)};var t=p?"Shift-Cmd":"Alt-Ctrl";n[m[t+"Up"]="addCursorToPrevLine"]=function(a){f(a,-1)},n[m[t+"Down"]="addCursorToNextLine"]=function(a){f(a,1)};var u="(){}[]";n[m["Shift-"+q+"Space"]="selectScope"]=function(a){h(a)||a.execCommand("selectAll")},n[m["Shift-"+q+"M"]="selectBetweenBrackets"]=function(b){if(!h(b))return a.Pass},n[m[q+"M"]="goToBracket"]=function(b){b.extendSelectionsBy(function(c){var d=b.scanForBracket(c.head,1);if(d&&0!=a.cmpPos(d.pos,c.head))return d.pos;var e=b.scanForBracket(c.head,-1);return e&&o(e.pos.line,e.pos.ch+1)||c.head})};var v=p?"Cmd-Ctrl-":"Shift-Ctrl-";n[m[v+"Up"]="swapLineUp"]=function(b){if(b.isReadOnly())return a.Pass;for(var c=b.listSelections(),d=[],e=b.firstLine()-1,f=[],g=0;g<c.length;g++){var h=c[g],i=h.from().line-1,j=h.to().line;f.push({anchor:o(h.anchor.line-1,h.anchor.ch),head:o(h.head.line-1,h.head.ch)}),0!=h.to().ch||h.empty()||--j,i>e?d.push(i,j):d.length&&(d[d.length-1]=j),e=j}b.operation(function(){for(var a=0;a<d.length;a+=2){var c=d[a],e=d[a+1],g=b.getLine(c);b.replaceRange("",o(c,0),o(c+1,0),"+swapLine"),e>b.lastLine()?b.replaceRange("\n"+g,o(b.lastLine()),null,"+swapLine"):b.replaceRange(g+"\n",o(e,0),null,"+swapLine")}b.setSelections(f),b.scrollIntoView()})},n[m[v+"Down"]="swapLineDown"]=function(b){if(b.isReadOnly())return a.Pass;for(var c=b.listSelections(),d=[],e=b.lastLine()+1,f=c.length-1;f>=0;f--){var g=c[f],h=g.to().line+1,i=g.from().line;0!=g.to().ch||g.empty()||h--,h<e?d.push(h,i):d.length&&(d[d.length-1]=i),e=i}b.operation(function(){for(var a=d.length-2;a>=0;a-=2){var c=d[a],e=d[a+1],f=b.getLine(c);c==b.lastLine()?b.replaceRange("",o(c-1),o(c),"+swapLine"):b.replaceRange("",o(c,0),o(c+1,0),"+swapLine"),b.replaceRange(f+"\n",o(e,0),null,"+swapLine")}b.scrollIntoView()})},n[m[q+"/"]="toggleCommentIndented"]=function(a){a.toggleComment({indent:!0})},n[m[q+"J"]="joinLines"]=function(a){for(var b=a.listSelections(),c=[],d=0;d<b.length;d++){for(var e=b[d],f=e.from(),g=f.line,h=e.to().line;d<b.length-1&&b[d+1].from().line==h;)h=b[++d].to().line;c.push({start:g,end:h,anchor:!e.empty()&&f})}a.operation(function(){for(var b=0,d=[],e=0;e<c.length;e++){for(var f,g=c[e],h=g.anchor&&o(g.anchor.line-b,g.anchor.ch),i=g.start;i<=g.end;i++){var j=i-b;i==g.end&&(f=o(j,a.getLine(j).length+1)),j<a.lastLine()&&(a.replaceRange(" ",o(j),o(j+1,/^\s*/.exec(a.getLine(j+1))[0].length)),++b)}d.push({anchor:h||f,head:f})}a.setSelections(d,0)})},n[m["Shift-"+q+"D"]="duplicateLine"]=function(a){a.operation(function(){for(var b=a.listSelections().length,c=0;c<b;c++){var d=a.listSelections()[c];d.empty()?a.replaceRange(a.getLine(d.head.line)+"\n",o(d.head.line,0)):a.replaceRange(a.getRange(d.from(),d.to()),d.from())}a.scrollIntoView()})},p||(m[q+"T"]="transposeChars"),n[m.F9="sortLines"]=function(a){i(a,!0)},n[m[q+"F9"]="sortLinesInsensitive"]=function(a){i(a,!1)},n[m.F2="nextBookmark"]=function(a){var b=a.state.sublimeBookmarks;if(b)for(;b.length;){var c=b.shift(),d=c.find();if(d)return b.push(c),a.setSelection(d.from,d.to)}},n[m["Shift-F2"]="prevBookmark"]=function(a){var b=a.state.sublimeBookmarks;if(b)for(;b.length;){b.unshift(b.pop());var c=b[b.length-1].find();if(c)return a.setSelection(c.from,c.to);b.pop()}},n[m[q+"F2"]="toggleBookmark"]=function(a){for(var b=a.listSelections(),c=a.state.sublimeBookmarks||(a.state.sublimeBookmarks=[]),d=0;d<b.length;d++){for(var e=b[d].from(),f=b[d].to(),g=a.findMarks(e,f),h=0;h<g.length;h++)if(g[h].sublimeBookmark){g[h].clear();for(var i=0;i<c.length;i++)c[i]==g[h]&&c.splice(i--,1);break}h==g.length&&c.push(a.markText(e,f,{sublimeBookmark:!0,clearWhenEmpty:!1}))}},n[m["Shift-"+q+"F2"]="clearBookmarks"]=function(a){var b=a.state.sublimeBookmarks;if(b)for(var c=0;c<b.length;c++)b[c].clear();b.length=0},n[m["Alt-F2"]="selectBookmarks"]=function(a){var b=a.state.sublimeBookmarks,c=[];if(b)for(var d=0;d<b.length;d++){var e=b[d].find();e?c.push({anchor:e.from,head:e.to}):b.splice(d--,0)}c.length&&a.setSelections(c,0)},m["Alt-Q"]="wrapLines";var w=q+"K ";m[w+q+"Backspace"]="delLineLeft",n[m.Backspace="smartBackspace"]=function(b){return b.somethingSelected()?a.Pass:void b.operation(function(){for(var c=b.listSelections(),d=b.getOption("indentUnit"),e=c.length-1;e>=0;e--){var f=c[e].head,g=b.getRange({line:f.line,ch:0},f),h=a.countColumn(g,null,b.getOption("tabSize")),i=b.findPosH(f,-1,"char",!1);if(g&&!/\S/.test(g)&&h%d==0){var j=new o(f.line,a.findColumn(g,h-d,d));j.ch!=f.ch&&(i=j)}b.replaceRange("",i,f,"+delete")}})},n[m[w+q+"K"]="delLineRight"]=function(a){a.operation(function(){for(var b=a.listSelections(),c=b.length-1;c>=0;c--)a.replaceRange("",b[c].anchor,o(b[c].to().line),"+delete");a.scrollIntoView()})},n[m[w+q+"U"]="upcaseAtCursor"]=function(a){j(a,function(a){return a.toUpperCase()})},n[m[w+q+"L"]="downcaseAtCursor"]=function(a){j(a,function(a){return a.toLowerCase()})},n[m[w+q+"Space"]="setSublimeMark"]=function(a){a.state.sublimeMark&&a.state.sublimeMark.clear(),a.state.sublimeMark=a.setBookmark(a.getCursor())},n[m[w+q+"A"]="selectToSublimeMark"]=function(a){var b=a.state.sublimeMark&&a.state.sublimeMark.find();b&&a.setSelection(a.getCursor(),b)},n[m[w+q+"W"]="deleteToSublimeMark"]=function(b){var c=b.state.sublimeMark&&b.state.sublimeMark.find();if(c){var d=b.getCursor(),e=c;if(a.cmpPos(d,e)>0){var f=e;e=d,d=f}b.state.sublimeKilled=b.getRange(d,e),b.replaceRange("",d,e)}},n[m[w+q+"X"]="swapWithSublimeMark"]=function(a){var b=a.state.sublimeMark&&a.state.sublimeMark.find();b&&(a.state.sublimeMark.clear(),a.state.sublimeMark=a.setBookmark(a.getCursor()),a.setCursor(b))},n[m[w+q+"Y"]="sublimeYank"]=function(a){null!=a.state.sublimeKilled&&a.replaceSelection(a.state.sublimeKilled,null,"paste")},m[w+q+"G"]="clearBookmarks",n[m[w+q+"C"]="showInCenter"]=function(a){var b=a.cursorCoords(null,"local");a.scrollTo(null,(b.top+b.bottom)/2-a.getScrollInfo().clientHeight/2)};var x=p?"Ctrl-Shift-":"Ctrl-Alt-";n[m[x+"Up"]="selectLinesUpward"]=function(a){a.operation(function(){for(var b=a.listSelections(),c=0;c<b.length;c++){var d=b[c];d.head.line>a.firstLine()&&a.addSelection(o(d.head.line-1,d.head.ch))}})},n[m[x+"Down"]="selectLinesDownward"]=function(a){a.operation(function(){for(var b=a.listSelections(),c=0;c<b.length;c++){var d=b[c];d.head.line<a.lastLine()&&a.addSelection(o(d.head.line+1,d.head.ch))}})},n[m[q+"F3"]="findUnder"]=function(a){l(a,!0)},n[m["Shift-"+q+"F3"]="findUnderPrevious"]=function(a){l(a,!1)},n[m["Alt-F3"]="findAllUnder"]=function(a){var b=k(a);if(b){for(var c=a.getSearchCursor(b.query),d=[],e=-1;c.findNext();)d.push({anchor:c.from(),head:c.to()}),c.from().line<=b.from.line&&c.from().ch<=b.from.ch&&e++;a.setSelections(d,e)}},m["Shift-"+q+"["]="fold",m["Shift-"+q+"]"]="unfold",m[w+q+"0"]=m[w+q+"J"]="unfoldAll",m[q+"I"]="findIncremental",m["Shift-"+q+"I"]="findIncrementalReverse",m[q+"H"]="replace",m.F3="findNext",m["Shift-F3"]="findPrev",a.normalizeKeyMap(m)})},{"../addon/edit/matchbrackets":12,"../addon/search/searchcursor":49,"../lib/codemirror":59}],58:[function(a,b,c){!function(d){"object"==typeof c&&"object"==typeof b?d(a("../lib/codemirror"),a("../addon/search/searchcursor"),a("../addon/dialog/dialog"),a("../addon/edit/matchbrackets.js")):"function"==typeof define&&define.amd?define(["../lib/codemirror","../addon/search/searchcursor","../addon/dialog/dialog","../addon/edit/matchbrackets"],d):d(CodeMirror)}(function(a){"use strict";var b=[{keys:"<Left>",type:"keyToKey",toKeys:"h"},{keys:"<Right>",type:"keyToKey",toKeys:"l"},{keys:"<Up>",type:"keyToKey",toKeys:"k"},{keys:"<Down>",type:"keyToKey",toKeys:"j"},{keys:"<Space>",type:"keyToKey",toKeys:"l"},{keys:"<BS>",type:"keyToKey",toKeys:"h",context:"normal"},{keys:"<C-Space>",type:"keyToKey",toKeys:"W"},{keys:"<C-BS>",type:"keyToKey",toKeys:"B",context:"normal"},{keys:"<S-Space>",type:"keyToKey",toKeys:"w"},{keys:"<S-BS>",type:"keyToKey",toKeys:"b",context:"normal"},{keys:"<C-n>",type:"keyToKey",toKeys:"j"},{keys:"<C-p>",type:"keyToKey",toKeys:"k"},{keys:"<C-[>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-c>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-[>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"<C-c>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"s",type:"keyToKey",toKeys:"cl",context:"normal"},{keys:"s",type:"keyToKey",toKeys:"c",context:"visual"},{keys:"S",type:"keyToKey",toKeys:"cc",context:"normal"},{keys:"S",type:"keyToKey",toKeys:"VdO",context:"visual"},{keys:"<Home>",type:"keyToKey",toKeys:"0"},{keys:"<End>",type:"keyToKey",toKeys:"$"},{keys:"<PageUp>",type:"keyToKey",toKeys:"<C-b>"},{keys:"<PageDown>",type:"keyToKey",toKeys:"<C-f>"},{keys:"<CR>",type:"keyToKey",toKeys:"j^",context:"normal"},{keys:"<Ins>",type:"action",action:"toggleOverwrite",context:"insert"},{keys:"H",type:"motion",motion:"moveToTopLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"M",type:"motion",motion:"moveToMiddleLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"L",type:"motion",motion:"moveToBottomLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"h",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!1}},{keys:"l",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!0}},{keys:"j",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,linewise:!0}},{keys:"k",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,linewise:!0}},{keys:"gj",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!0}},{keys:"gk",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!1}},{keys:"w",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1}},{keys:"W",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1,bigWord:!0}},{keys:"e",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,inclusive:!0}},{keys:"E",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"b",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1}},{keys:"B",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1,bigWord:!0}},{keys:"ge",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,inclusive:!0}},{keys:"gE",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"{",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!1,toJumplist:!0}},{keys:"}",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!0,toJumplist:!0}},{keys:"<C-f>",type:"motion",motion:"moveByPage",motionArgs:{forward:!0}},{keys:"<C-b>",type:"motion",motion:"moveByPage",motionArgs:{forward:!1}},{keys:"<C-d>",type:"motion",motion:"moveByScroll",motionArgs:{forward:!0,explicitRepeat:!0}},{keys:"<C-u>",type:"motion",motion:"moveByScroll",motionArgs:{forward:!1,explicitRepeat:!0}},{keys:"gg",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"G",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!0,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"0",type:"motion",motion:"moveToStartOfLine"},{keys:"^",type:"motion",motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"+",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0}},{keys:"-",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,toFirstChar:!0}},{keys:"_",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0,repeatOffset:-1}},{keys:"$",type:"motion",motion:"moveToEol",motionArgs:{inclusive:!0}},{keys:"%",type:"motion",motion:"moveToMatchedSymbol",motionArgs:{inclusive:!0,toJumplist:!0}},{keys:"f<character>",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"F<character>",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!1}},{keys:"t<character>",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"T<character>",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!1}},{keys:";",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!0}},{keys:",",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!1}},{keys:"'<character>",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0,linewise:!0}},{keys:"`<character>",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0}},{keys:"]`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0}},{keys:"[`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1}},{keys:"]'",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0,linewise:!0}},{keys:"['",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1,linewise:!0}},{keys:"]p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0,matchIndent:!0}},{keys:"[p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0,matchIndent:!0}},{keys:"]<character>",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!0,toJumplist:!0}},{keys:"[<character>",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!1,toJumplist:!0}},{keys:"|",type:"motion",motion:"moveToColumn"},{keys:"o",type:"motion",motion:"moveToOtherHighlightedEnd",context:"visual"},{keys:"O",type:"motion",motion:"moveToOtherHighlightedEnd",motionArgs:{sameLine:!0},context:"visual"},{keys:"d",type:"operator",operator:"delete"},{keys:"y",type:"operator",operator:"yank"},{keys:"c",type:"operator",operator:"change"},{keys:">",type:"operator",operator:"indent",operatorArgs:{indentRight:!0}},{keys:"<",type:"operator",operator:"indent",operatorArgs:{indentRight:!1}},{keys:"g~",type:"operator",operator:"changeCase"},{keys:"gu",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},isEdit:!0},{keys:"gU",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},isEdit:!0},{keys:"n",type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:!0}},{keys:"N",type:"motion",motion:"findNext",motionArgs:{forward:!1,toJumplist:!0}},{keys:"x",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!0},operatorMotionArgs:{visualLine:!1}},{keys:"X",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!1},operatorMotionArgs:{visualLine:!0}},{keys:"D",type:"operatorMotion",operator:"delete",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"D",type:"operator",operator:"delete",operatorArgs:{linewise:!0},context:"visual"},{keys:"Y",type:"operatorMotion",operator:"yank",motion:"expandToLine",motionArgs:{linewise:!0},context:"normal"},{keys:"Y",type:"operator",operator:"yank",operatorArgs:{linewise:!0},context:"visual"},{keys:"C",type:"operatorMotion",operator:"change",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"C",type:"operator",operator:"change",operatorArgs:{linewise:!0},context:"visual"},{keys:"~",type:"operatorMotion",operator:"changeCase",motion:"moveByCharacters",motionArgs:{forward:!0},operatorArgs:{shouldMoveCursor:!0},context:"normal"},{keys:"~",type:"operator",operator:"changeCase",context:"visual"},{keys:"<C-w>",type:"operatorMotion",operator:"delete",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1},context:"insert"},{keys:"<C-i>",type:"action",action:"jumpListWalk",actionArgs:{forward:!0}},{keys:"<C-o>",type:"action",action:"jumpListWalk",actionArgs:{forward:!1}},{keys:"<C-e>",type:"action",action:"scroll",actionArgs:{forward:!0,linewise:!0}},{keys:"<C-y>",type:"action",action:"scroll",actionArgs:{forward:!1,linewise:!0}},{keys:"a",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"charAfter"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"eol"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"endOfSelectedArea"},context:"visual"},{keys:"i",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"inplace"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"firstNonBlank"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"startOfSelectedArea"},context:"visual"},{keys:"o",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!0},context:"normal"},{keys:"O",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!1},context:"normal"},{keys:"v",type:"action",action:"toggleVisualMode"},{keys:"V",type:"action",action:"toggleVisualMode",actionArgs:{linewise:!0}},{keys:"<C-v>",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"<C-q>",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"gv",type:"action",action:"reselectLastSelection"},{keys:"J",type:"action",action:"joinLines",isEdit:!0},{keys:"p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0}},{keys:"P",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0}},{keys:"r<character>",type:"action",action:"replace",isEdit:!0},{keys:"@<character>",type:"action",action:"replayMacro"},{keys:"q<character>",type:"action",action:"enterMacroRecordMode"},{keys:"R",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{replace:!0}},{keys:"u",type:"action",action:"undo",context:"normal"},{keys:"u",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},context:"visual",isEdit:!0},{keys:"U",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},context:"visual",isEdit:!0},{keys:"<C-r>",type:"action",action:"redo"},{keys:"m<character>",type:"action",action:"setMark"},{keys:'"<character>',type:"action",action:"setRegister"},{keys:"zz",type:"action",action:"scrollToCursor",actionArgs:{position:"center"}},{keys:"z.",type:"action",action:"scrollToCursor",actionArgs:{position:"center"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"zt",type:"action",action:"scrollToCursor",actionArgs:{position:"top"}},{keys:"z<CR>",type:"action",action:"scrollToCursor",actionArgs:{position:"top"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"z-",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"}},{keys:"zb",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:".",type:"action",action:"repeatLastEdit"},{keys:"<C-a>",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!0,backtrack:!1}},{keys:"<C-x>",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!1,backtrack:!1}},{keys:"<C-t>",type:"action",action:"indent",actionArgs:{indentRight:!0},context:"insert"},{keys:"<C-d>",type:"action",action:"indent",actionArgs:{indentRight:!1},context:"insert"},{keys:"a<character>",type:"motion",motion:"textObjectManipulation"},{keys:"i<character>",type:"motion",motion:"textObjectManipulation",motionArgs:{textObjectInner:!0}},{keys:"/",type:"search",searchArgs:{forward:!0,querySrc:"prompt",toJumplist:!0}},{keys:"?",type:"search",searchArgs:{forward:!1,querySrc:"prompt",toJumplist:!0}},{keys:"*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"g*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:"g#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:":",type:"ex"}],c=[{name:"colorscheme",shortName:"colo"},{name:"map"},{name:"imap",shortName:"im"},{name:"nmap",shortName:"nm"},{name:"vmap",shortName:"vm"},{name:"unmap"},{name:"write",shortName:"w"},{name:"undo",shortName:"u"},{name:"redo",shortName:"red"},{name:"set",shortName:"se"},{name:"set",shortName:"se"},{name:"setlocal",shortName:"setl"},{name:"setglobal",shortName:"setg"},{name:"sort",shortName:"sor"},{name:"substitute",shortName:"s",possiblyAsync:!0},{name:"nohlsearch",shortName:"noh"},{name:"yank",shortName:"y"},{name:"delmarks",shortName:"delm"},{name:"registers",shortName:"reg",excludeFromCommandHistory:!0},{name:"global",shortName:"g"}],d=a.Pos,e=function(){function e(b){b.setOption("disableInput",!0),b.setOption("showCursorWhenSelecting",!1),a.signal(b,"vim-mode-change",{mode:"normal"}),b.on("cursorActivity",bb),x(b),a.on(b.getInputField(),"paste",k(b))}function f(b){b.setOption("disableInput",!1),b.off("cursorActivity",bb),a.off(b.getInputField(),"paste",k(b)),b.state.vim=null}function g(b,c){this==a.keyMap.vim&&a.rmClass(b.getWrapperElement(),"cm-fat-cursor"),c&&c.attach==h||f(b)}function h(b,c){this==a.keyMap.vim&&a.addClass(b.getWrapperElement(),"cm-fat-cursor"),c&&c.attach==h||e(b)}function i(b,c){if(c){if(this[b])return this[b];var d=j(b);if(!d)return!1;var e=a.Vim.findKey(c,d);return"function"==typeof e&&a.signal(c,"vim-keypress",d),e}}function j(a){if("'"==a.charAt(0))return a.charAt(1);var b=a.split(/-(?!$)/),c=b[b.length-1];if(1==b.length&&1==b[0].length)return!1;if(2==b.length&&"Shift"==b[0]&&1==c.length)return!1;for(var d=!1,e=0;e<b.length;e++){var f=b[e];f in ib?b[e]=ib[f]:d=!0,f in jb&&(b[e]=jb[f])}return!!d&&(q(c)&&(b[b.length-1]=c.toLowerCase()),"<"+b.join("-")+">")}function k(a){var b=a.state.vim;return b.onPasteFn||(b.onPasteFn=function(){b.insertMode||(a.setCursor(L(a.getCursor(),0,1)),Bb.enterInsertMode(a,{},b))}),b.onPasteFn}function l(a,b){for(var c=[],d=a;d<a+b;d++)c.push(String.fromCharCode(d));return c}function m(a,b){return b>=a.firstLine()&&b<=a.lastLine()}function n(a){return/^[a-z]$/.test(a)}function o(a){return"()[]{}".indexOf(a)!=-1}function p(a){return kb.test(a)}function q(a){return/^[A-Z]$/.test(a)}function r(a){return/^\s*$/.test(a)}function s(a,b){for(var c=0;c<b.length;c++)if(b[c]==a)return!0;return!1}function t(a,b,c,d,e){if(void 0===b&&!e)throw Error("defaultValue is required unless callback is provided");if(c||(c="string"),sb[a]={type:c,defaultValue:b,callback:e},d)for(var f=0;f<d.length;f++)sb[d[f]]=sb[a];b&&u(a,b)}function u(a,b,c,d){var e=sb[a];d=d||{};var f=d.scope;if(!e)return new Error("Unknown option: "+a);if("boolean"==e.type){if(b&&b!==!0)return new Error("Invalid argument: "+a+"="+b);b!==!1&&(b=!0)}e.callback?("local"!==f&&e.callback(b,void 0),"global"!==f&&c&&e.callback(b,c)):("local"!==f&&(e.value="boolean"==e.type?!!b:b),"global"!==f&&c&&(c.state.vim.options[a]={value:b}))}function v(a,b,c){var d=sb[a];c=c||{};var e=c.scope;if(!d)return new Error("Unknown option: "+a);{if(!d.callback){var f="global"!==e&&b&&b.state.vim.options[a];return(f||"local"!==e&&d||{}).value}var f=b&&d.callback(void 0,b);if("global"!==e&&void 0!==f)return f;if("local"!==e)return d.callback()}}function w(){this.latestRegister=void 0,this.isPlaying=!1,this.isRecording=!1,this.replaySearchQueries=[],this.onRecordingDone=void 0,this.lastInsertModeChanges=ub()}function x(a){return a.state.vim||(a.state.vim={inputState:new z,lastEditInputState:void 0,lastEditActionCommand:void 0,lastHPos:-1,lastHSPos:-1,lastMotion:null,marks:{},fakeCursor:null,insertMode:!1,insertModeRepeat:void 0,visualMode:!1,visualLine:!1,visualBlock:!1,lastSelection:null,lastPastedText:null,sel:{},options:{}}),a.state.vim}function y(){vb={searchQuery:null,searchIsReversed:!1,lastSubstituteReplacePart:void 0,jumpList:tb(),macroModeState:new w,lastCharacterSearch:{increment:0,forward:!0,selectedCharacter:""},registerController:new D({}),searchHistoryController:new E,exCommandHistoryController:new E};for(var a in sb){var b=sb[a];b.value=b.defaultValue}}function z(){this.prefixRepeat=[],this.motionRepeat=[],this.operator=null,this.operatorArgs=null,this.motion=null,this.motionArgs=null,this.keyBuffer=[],this.registerName=null}function A(b,c){b.state.vim.inputState=new z,a.signal(b,"vim-command-done",c)}function B(a,b,c){this.clear(),this.keyBuffer=[a||""],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!!b,this.blockwise=!!c}function C(a,b){var c=vb.registerController.registers;if(!a||1!=a.length)throw Error("Register name must be 1 character");if(c[a])throw Error("Register already defined "+a);c[a]=b,rb.push(a)}function D(a){this.registers=a,this.unnamedRegister=a['"']=new B,a["."]=new B,a[":"]=new B,a["/"]=new B}function E(){this.historyBuffer=[],this.iterator=0,this.initialPrefix=null}function F(a,b){zb[a]=b}function G(a,b){for(var c=[],d=0;d<b;d++)c.push(a);return c}function H(a,b){Ab[a]=b}function I(a,b){Bb[a]=b}function J(a,b,c){var e=Math.min(Math.max(a.firstLine(),b.line),a.lastLine()),f=X(a,e)-1;f=c?f+1:f;var g=Math.min(Math.max(0,b.ch),f);return d(e,g)}function K(a){var b={};for(var c in a)a.hasOwnProperty(c)&&(b[c]=a[c]);return b}function L(a,b,c){return"object"==typeof b&&(c=b.ch,b=b.line),d(a.line+b,a.ch+c)}function M(a,b){return{line:b.line-a.line,ch:b.line-a.line}}function N(a,b,c,d){for(var e,f=[],g=[],h=0;h<b.length;h++){var i=b[h];"insert"==c&&"insert"!=i.context||i.context&&i.context!=c||d.operator&&"action"==i.type||!(e=O(a,i.keys))||("partial"==e&&f.push(i),"full"==e&&g.push(i))}return{partial:f.length&&f,full:g.length&&g}}function O(a,b){if("<character>"==b.slice(-11)){var c=b.length-11,d=a.slice(0,c),e=b.slice(0,c);return d==e&&a.length>c?"full":0==e.indexOf(d)&&"partial"}return a==b?"full":0==b.indexOf(a)&&"partial"}function P(a){var b=/^.*(<[^>]+>)$/.exec(a),c=b?b[1]:a.slice(-1);if(c.length>1)switch(c){case"<CR>":c="\n";break;case"<Space>":c=" ";break;default:c=""}return c}function Q(a,b,c){return function(){for(var d=0;d<c;d++)b(a)}}function R(a){return d(a.line,a.ch)}function S(a,b){return a.ch==b.ch&&a.line==b.line}function T(a,b){return a.line<b.line||a.line==b.line&&a.ch<b.ch}function U(a,b){return arguments.length>2&&(b=U.apply(void 0,Array.prototype.slice.call(arguments,1))),T(a,b)?a:b}function V(a,b){return arguments.length>2&&(b=V.apply(void 0,Array.prototype.slice.call(arguments,1))),T(a,b)?b:a}function W(a,b,c){var d=T(a,b),e=T(b,c);return d&&e}function X(a,b){return a.getLine(b).length}function Y(a){return a.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}function Z(a){return a.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1")}function $(a,b,c){var e=X(a,b),f=new Array(c-e+1).join(" ");a.setCursor(d(b,e)),a.replaceRange(f,a.getCursor())}function _(a,b){var c=[],e=a.listSelections(),f=R(a.clipPos(b)),g=!S(b,f),h=a.getCursor("head"),i=ba(e,h),j=S(e[i].head,e[i].anchor),k=e.length-1,l=k-i>i?k:0,m=e[l].anchor,n=Math.min(m.line,f.line),o=Math.max(m.line,f.line),p=m.ch,q=f.ch,r=e[l].head.ch-p,s=q-p;r>0&&s<=0?(p++,g||q--):r<0&&s>=0?(p--,j||q++):r<0&&s==-1&&(p--,q++);for(var t=n;t<=o;t++){var u={anchor:new d(t,p),head:new d(t,q)};c.push(u)}return a.setSelections(c),b.ch=q,m.ch=p,m}function aa(a,b,c){for(var d=[],e=0;e<c;e++){var f=L(b,e,0);d.push({anchor:f,head:f})}a.setSelections(d,0)}function ba(a,b,c){for(var d=0;d<a.length;d++){var e="head"!=c&&S(a[d].anchor,b),f="anchor"!=c&&S(a[d].head,b);if(e||f)return d}return-1}function ca(a,b){var c=b.lastSelection,e=function(){var b=a.listSelections(),c=b[0],d=b[b.length-1],e=T(c.anchor,c.head)?c.anchor:c.head,f=T(d.anchor,d.head)?d.head:d.anchor;return[e,f]},f=function(){var b=a.getCursor(),e=a.getCursor(),f=c.visualBlock;if(f){var g=f.width,h=f.height;e=d(b.line+h,b.ch+g);for(var i=[],j=b.line;j<e.line;j++){var k=d(j,b.ch),l=d(j,e.ch),m={anchor:k,head:l};i.push(m)}a.setSelections(i)}else{var n=c.anchorMark.find(),o=c.headMark.find(),p=o.line-n.line,q=o.ch-n.ch;e={line:e.line+p,ch:p?e.ch:q+e.ch},c.visualLine&&(b=d(b.line,0),e=d(e.line,X(a,e.line))),a.setSelection(b,e)}return[b,e]};return b.visualMode?e():f()}function da(a,b){var c=b.sel.anchor,d=b.sel.head;b.lastPastedText&&(d=a.posFromIndex(a.indexFromPos(c)+b.lastPastedText.length),b.lastPastedText=null),b.lastSelection={anchorMark:a.setBookmark(c),