Comparing changes
Open a pull request
|
|
marijnh |
Bump version number post-4.3
|
f8cf319
|
|||
|
|
binny + mightyguava |
[vim] visual Block with delete functionality
|
aa43a39
|
|
|
williamstein + marijnh |
Add SageMathCloud to real world examples
|
2516fe1
|
|||
|
|
mtaran-google + marijnh |
[comment addon] Avoid killing block comments outside selection
Currently, if you perform the uncomment command with the cursor outside a single-line block comment, it will uncomment that block comment. This is unfortunate behavior for cases where the block comment is used to describe the parameter to a function like "foo(/* index */ 0)". It's also inconsistent: if you have a selection and a single-line block comment after the end of the selection, uncomment() will do nothing, however if you have a selection with a single-line block comment *before* the selection, it will line-comment out all the lines of the selection instead. This also isn't a complete fix, but significantly reduces the scope of the problem. For example if you have "/* foo */ bar /* baz */", uncomment() still does the wrong thing when the cursor is on foo or baz. |
009deb7
|
|||
|
|
mtaran-google + marijnh |
[comment tests] Test ctrl+/ on inline block comments
|
1e78035
|
|||
|
|
mtaran-google + marijnh |
[sublime] Add findAllUnder command
|
0abae99
|
|||
|
|
marijnh |
[sublime] Fix null dereference bug introduced by #2655
|
da716e0
|
|||
|
|
binny + mightyguava |
[vim] Update unit tests for switching between visual modes
|
e20d175
|
|
|
marijnh |
Add note about JSHint/Lint to CONTRIBUTING.md
|
4cc9d2a
|
|||
|
|
binny + mightyguava |
[vim] visual block yank
Also updated select block to return selectionStart. Operators from now on will stop using curStart and curEnd, and rely on the current selection instead. The selection will be generated in evalInput if needed. |
2a8480e
|
|||
|
|
mightyguava |
[vim] Separate yank and yank visual block tests
|
44592da
|
|||
|
|
marijnh |
[smartymixed mode] Fix regexp escaping
Issue #2659 |
6654b70
|
|||
|
|
marijnh |
Move update of delayedCallbackDepth to start of endOperation
To make it less likely that an error will corrupt its value and break all further signalLater events. Issue #2626 |
b4a6198
|
|||
|
|
marijnh |
[show-hint addon] Fix offset computation when moving list above cursor
Issue #2663 |
73aaf3f
|
|||
|
|
Leonya + marijnh |
[css mode] Fix nonStandardPropertyKeywords definition for consistency
|
bc9c42b
|
|
|
marijnh |
[real-world uses] Add CodeWorld
|
0320b3f
|
|
|
binny + mightyguava |
[vim] swap case in visual block
|
cfc0801
|
|||
|
|
mightyguava |
[vim] Simplify swapcase logic
|
6aadaae
|
|
|
binny + mightyguava |
visual_o updated for blockwise visual
|
d08aa03
|
|
|
marijnh |
[closebrackets addon] Add more refined heuristics for when to close q…
…uote characters Looks at token types to determine whether the quote would actually open a string Issue #2657 |
c6eb304
|
|||
|
|
neochief + marijnh |
[searchcursor addon] Fix reverse case-insensitive searching for multi…
…line strings |
afc1e5c
|
|||
|
|
nilp0inter + marijnh |
[mode/meta.js] Map application/javascript to javascript mode
|
9826caf
|
|||
|
|
Leonya + marijnh |
Kotlin mode
|
fc3bb8f
|
|||
|
|
marijnh |
[kotlin mode] Integrate
Issue #2678 |
4928d37
|
|||
|
|
marijnh |
[multi-editor operations] Set up operation grouping
Now nested operations from different editors end at the same time |
b55cc7f
|
|||
|
|
marijnh |
[multi-editor operations] Fire delayed events before the operation ends
|
0bdd5ea
|
|||
|
|
marijnh |
Run operations cautiously again in highlightWorker
|
55e1ed9
|
|||
|
|
marijnh |
Don't wrap onKeyUp in an operation
It doesn't need it |
24920fb
|
|||
|
|
marijnh |
[multi-editor operations] Split actions at op end into steps, call in…
… order |
e72560b
|
|||
|
|
marijnh |
[multi-editor operations] Add a few tests
|
c698ab7
|
|
|
marijnh |
Fix broken double-checking of display coverage
Both a potential infinite loop, due to updateDisplayIfNeeded not using the updated set of visibile lines, and the fact that the current check wasn't really covering changing document size, due to it happening before the call to setDocumentHeight Issue #2683 |
238b451
|
|||
|
|
RichardVanDerMeer + marijnh |
[vbscript mode] Fixed "Cannot read property 'substr' of null"
Error occurs when entering multiple dots |
6c0cd2b
|
|
|
mightyguava |
[vim] Add features list to demo page
|
e92998a
|
|||
|
|
binny + mightyguava |
[vim] change for blockwise visual
|
770c097
|
|
|
marijnh |
Ignore auto indentation beyond column 80
Issue #2688 |
5285494
|
|||
|
|
marijnh |
Bump indentation-ignoring threshold to 150
You might actually want to align things on long lines Issue #2688 |
ce75363
|
|||
|
|
marijnh |
Bind Cmd-Home to goDocStart on Mac
Closes #2687 |
ae978a7
|
|||
|
|
timothee-alby + marijnh |
Fix key-binding behaviour on Mac in wrap mode
Bind Cmd-Left to goLineLeft and Cmd-right to goLineRight instead of goLineStart and goLineEnd Create and bind delVisualLeft and delVisualRight to Cmd-Backspace and Cmd-Delete |
0b3d49f
|
|||
|
|
marijnh |
Catch and suppress input of certain code point on Mac
Ctrl-arrow key presses were, for some reason, inserting such characters into our textarea. Issue #2689 |
0392fd3
|
|||
|
|
nilp0inter + marijnh |
[lint addon] Do not constrain severity names
Issue #2681 |
f02df0b
|
|
|
marijnh |
Don't treat %= as the start of a string
Closes #2692 |
13acf66
|
|
|
marijnh |
Track last copied text, in order to find selection boundaries on paste
Issue #2697 |
f4ae5b4
|
|
|
marijnh |
Remove unused extra argument to computeSelAfterChange
|
bc87689
|
|||
|
|
marijnh |
[javascript mode] Indent properly in case of function arg in wrapped …
…arg list |
59138ec
|
|
|
Redsandro + marijnh |
Disable replace for readOnly content
Disable the `replace()` when the selected `CodeMirror` is `readOnly`. |
2fa988d
|
|||
|
|
binny + mightyguava |
[vim] visual block replace
|
ddd36cb
|
|||
|
|
binny + mightyguava |
[vim] changeCase for blockwise visual
|
bce6992
|
|
|
binny + mightyguava |
[vim] using dot to replay actions and operators
|
9312c71
|
|
|
marijnh |
[yaml mode] Tweak key regexp
Issue #2695 |
1d4b525
|
|||
|
|
marijnh |
Also split pasted content by selection when selection length is a mul…
…tiple of clipboard length Issue #2697 |
e02b946
|
|||
|
|
hason + marijnh |
[bower.json] Normalized a package name
The package name on http://bower.io/search/ is lowercase. |
ee088bc
|
|||
|
|
marijnh |
Mark release 4.4
|
485a7da
|
- +9 −0 AUTHORS
- +4 −0 CONTRIBUTING.md
- +11 −0 addon/comment/comment.js
- +20 −5 addon/edit/closebrackets.js
- +2 −2 addon/hint/show-hint.js
- +2 −3 addon/lint/lint.js
- +1 −0 addon/search/search.js
- +1 −1 addon/search/searchcursor.js
- +2 −2 bower.json
- +20 −12 demo/vim.html
- +2 −0 doc/compress.html
- +13 −7 doc/manual.html
- +2 −0 doc/realworld.html
- +14 −0 doc/releases.html
- +1 −1 index.html
- +23 −5 keymap/sublime.js
- +425 −118 keymap/vim.js
- +321 −158 lib/codemirror.js
- +1 −0 mode/clike/clike.js
- +3 −3 mode/css/css.js
- +1 −0 mode/index.html
- +2 −0 mode/javascript/javascript.js
- +6 −0 mode/javascript/test.js
- +89 −0 mode/kotlin/index.html
- +280 −0 mode/kotlin/kotlin.js
- +97 −95 mode/meta.js
- +1 −1 mode/puppet/puppet.js
- +18 −4 mode/ruby/ruby.js
- +17 −12 mode/smartymixed/smartymixed.js
- +1 −1 mode/vbscript/vbscript.js
- +1 −1 mode/yaml/yaml.js
- +1 −1 package.json
- +37 −0 test/comment_test.js
- +1 −1 test/lint/lint.js
- +35 −0 test/test.js
- +153 −11 test/vim_test.js
| @@ -18,6 +18,7 @@ Alberto Pose | ||
| Albert Xing | ||
| Alexander Pavlov | ||
| Alexander Schepanovski | ||
| +Alexander Shvets | ||
| Alexander Solovyov | ||
| Alexandre Bique | ||
| alexey-k | ||
| @@ -168,6 +169,7 @@ Jason Grout | ||
| Jason Johnston | ||
| Jason San Jose | ||
| Jason Siefken | ||
| +Jaydeep Solanki | ||
| Jean Boussier | ||
| jeffkenton | ||
| Jeff Pickhardt | ||
| @@ -205,6 +207,7 @@ kubelsmieci | ||
| Lanny | ||
| Laszlo Vidacs | ||
| leaf corcoran | ||
| +Leonid Khachaturov | ||
| Leonya Khachaturov | ||
| Liam Newman | ||
| LM | ||
| @@ -269,6 +272,7 @@ Niels van Groningen | ||
| Nikita Beloglazov | ||
| Nikita Vasilyev | ||
| Nikolay Kostov | ||
| +nilp0inter | ||
| nlwillia | ||
| pablo | ||
| Page | ||
| @@ -291,14 +295,17 @@ Radek Piórkowski | ||
| Rahul | ||
| Randy Edmunds | ||
| Rasmus Erik Voel Jensen | ||
| +Richard van der Meer | ||
| Richard Z.H. Wang | ||
| +Roberto Abdelkader Martínez Pérez | ||
| robertop23 | ||
| Robert Plummer | ||
| Ruslan Osmanov | ||
| Ryan Prior | ||
| sabaca | ||
| Samuel Ainsworth | ||
| sandeepshetty | ||
| +Sander AKA Redsandro | ||
| santec | ||
| Sascha Peilicke | ||
| satchmorun | ||
| @@ -330,6 +337,7 @@ Thaddee Tyl | ||
| think | ||
| Thomas Dvornik | ||
| Thomas Schmid | ||
| +Tim Alby | ||
| Tim Baumann | ||
| Timothy Farrell | ||
| Timothy Hatcher | ||
| @@ -349,6 +357,7 @@ Volker Mische | ||
| wenli | ||
| Wesley Wiser | ||
| William Jamieson | ||
| +William Stein | ||
| Wojtek Ptak | ||
| Xavier Mendez | ||
| YNH Webdev | ||
| @@ -70,3 +70,7 @@ should be asked on the | ||
| - Note that the linter (`bin/lint`) which is run after each commit | ||
| complains about unused variables and functions. Prefix their names | ||
| with an underscore to muffle it. | ||
| + | ||
| +- CodeMirror does *not* follow JSHint or JSLint prescribed style. | ||
| + Patches that try to 'fix' code to pass one of these linters will be | ||
| + unceremoniously discarded. | ||
| @@ -153,6 +153,17 @@ | ||
| !/comment/.test(self.getTokenTypeAt(Pos(end, close + 1)))) | ||
| return false; | ||
| + // Avoid killing block comments completely outside the selection. | ||
| + // Positions of the last startString before the start of the selection, and the first endString after it. | ||
| + var lastStart = startLine.lastIndexOf(startString, from.ch); | ||
| + var firstEnd = lastStart == -1 ? -1 : startLine.slice(0, from.ch).indexOf(endString, lastStart + startString.length); | ||
| + if (lastStart != -1 && firstEnd != -1) return false; | ||
| + // Positions of the first endString after the end of the selection, and the last startString before it. | ||
| + firstEnd = endLine.indexOf(endString, to.ch); | ||
| + var almostLastStart = endLine.slice(to.ch).lastIndexOf(startString, firstEnd - to.ch); | ||
| + lastStart = (firstEnd == -1 || almostLastStart == -1) ? -1 : to.ch + almostLastStart; | ||
| + if (firstEnd != -1 && lastStart != -1) return false; | ||
| + | ||
| self.operation(function() { | ||
| self.replaceRange("", Pos(end, close - (pad && endLine.slice(close - pad.length, close) == pad ? pad.length : 0)), | ||
| Pos(end, close + endString.length)); | ||
| @@ -36,6 +36,22 @@ | ||
| return str.length == 2 ? str : null; | ||
| } | ||
| + // Project the token type that will exists after the given char is | ||
| + // typed, and use it to determine whether it would cause the start | ||
| + // of a string token. | ||
| + function enteringString(cm, pos, ch) { | ||
| + var line = cm.getLine(pos.line); | ||
| + var token = cm.getTokenAt(pos); | ||
| + if (/\bstring2?\b/.test(token.type)) return false; | ||
| + var stream = new CodeMirror.StringStream(line.slice(0, pos.ch) + ch + line.slice(pos.ch), 4); | ||
| + stream.pos = stream.start = token.start; | ||
| + for (;;) { | ||
| + var type1 = cm.getMode().token(stream, token.state); | ||
| + if (stream.pos >= pos.ch + 1) return /\bstring2?\b/.test(type1); | ||
| + stream.start = stream.pos; | ||
| + } | ||
| + } | ||
| + | ||
| function buildKeymap(pairs) { | ||
| var map = { | ||
| name : "autoCloseBrackets", | ||
| @@ -61,8 +77,6 @@ | ||
| var ranges = cm.listSelections(), type, next; | ||
| for (var i = 0; i < ranges.length; i++) { | ||
| var range = ranges[i], cur = range.head, curType; | ||
| - if (left == "'" && cm.getTokenTypeAt(cur) == "comment") | ||
| - return CodeMirror.Pass; | ||
| var next = cm.getRange(cur, Pos(cur.line, cur.ch + 1)); | ||
| if (!range.empty()) | ||
| curType = "surround"; | ||
| @@ -75,9 +89,10 @@ | ||
| cm.getRange(Pos(cur.line, cur.ch - 2), cur) == left + left && | ||
| (cur.ch <= 2 || cm.getRange(Pos(cur.line, cur.ch - 3), Pos(cur.line, cur.ch - 2)) != left)) | ||
| curType = "addFour"; | ||
| - else if (left == right && CodeMirror.isWordChar(next)) | ||
| - return CodeMirror.Pass; | ||
| - else if (cm.getLine(cur.line).length == cur.ch || closingBrackets.indexOf(next) >= 0 || SPACE_CHAR_REGEX.test(next)) | ||
| + else if (left == '"' || left == "'") { | ||
| + if (!CodeMirror.isWordChar(next) && enteringString(cm, cur, left)) curType = "both"; | ||
| + else return CodeMirror.Pass; | ||
| + } else if (cm.getLine(cur.line).length == cur.ch || closingBrackets.indexOf(next) >= 0 || SPACE_CHAR_REGEX.test(next)) | ||
| curType = "both"; | ||
| else | ||
| return CodeMirror.Pass; | ||
| @@ -228,9 +228,9 @@ | ||
| (completion.options.container || document.body).appendChild(hints); | ||
| var box = hints.getBoundingClientRect(), overlapY = box.bottom - winH; | ||
| if (overlapY > 0) { | ||
| - var height = box.bottom - box.top, curTop = box.top - (pos.bottom - pos.top); | ||
| + var height = box.bottom - box.top, curTop = pos.top - (pos.bottom - box.top); | ||
| if (curTop - height > 0) { // Fits above cursor | ||
| - hints.style.top = (top = curTop - height) + "px"; | ||
| + hints.style.top = (top = pos.top - height) + "px"; | ||
| below = false; | ||
| } else if (height > winH) { | ||
| hints.style.height = (winH - 5) + "px"; | ||
| @@ -11,7 +11,6 @@ | ||
| })(function(CodeMirror) { | ||
| "use strict"; | ||
| var GUTTER_ID = "CodeMirror-lint-markers"; | ||
| - var SEVERITIES = /^(?:error|warning)$/; | ||
| function showTooltip(e, content) { | ||
| var tt = document.createElement("div"); | ||
| @@ -110,7 +109,7 @@ | ||
| function annotationTooltip(ann) { | ||
| var severity = ann.severity; | ||
| - if (!SEVERITIES.test(severity)) severity = "error"; | ||
| + if (!severity) severity = "error"; | ||
| var tip = document.createElement("div"); | ||
| tip.className = "CodeMirror-lint-message-" + severity; | ||
| tip.appendChild(document.createTextNode(ann.message)); | ||
| @@ -141,7 +140,7 @@ | ||
| for (var i = 0; i < anns.length; ++i) { | ||
| var ann = anns[i]; | ||
| var severity = ann.severity; | ||
| - if (!SEVERITIES.test(severity)) severity = "error"; | ||
| + if (!severity) severity = "error"; | ||
| maxSeverity = getMaxSeverity(maxSeverity, severity); | ||
| if (options.formatAnnotation) ann = options.formatAnnotation(ann); | ||
| @@ -110,6 +110,7 @@ | ||
| var replacementQueryDialog = 'With: <input type="text" style="width: 10em"/>'; | ||
| var doReplaceConfirm = "Replace? <button>Yes</button> <button>No</button> <button>Stop</button>"; | ||
| function replace(cm, all) { | ||
| + if (cm.getOption("readOnly")) return; | ||
| dialog(cm, replaceQueryDialog, "Replace:", cm.getSelection(), function(query) { | ||
| if (!query) return; | ||
| query = parseQuery(query); | ||
| @@ -107,7 +107,7 @@ | ||
| var from = Pos(pos.line, cut); | ||
| for (var ln = pos.line + 1, i = 1; i < last; ++i, ++ln) | ||
| if (target[i] != fold(doc.getLine(ln))) return; | ||
| - if (doc.getLine(ln).slice(0, origTarget[last].length) != target[last]) return; | ||
| + if (fold(doc.getLine(ln).slice(0, origTarget[last].length)) != target[last]) return; | ||
| return {from: from, to: Pos(ln, origTarget[last].length)}; | ||
| } | ||
| }; | ||
| @@ -1,6 +1,6 @@ | ||
| { | ||
| - "name": "CodeMirror", | ||
| - "version":"4.3.0", | ||
| + "name": "codemirror", | ||
| + "version":"4.4.0", | ||
| "main": ["lib/codemirror.js", "lib/codemirror.css"], | ||
| "ignore": [ | ||
| "**/.*", | ||
| @@ -45,17 +45,32 @@ | ||
| return (--n >= 0) ? (unsigned char) *bufp++ : EOF; | ||
| } | ||
| </textarea></form> | ||
| -<div id="command-display" style="width: 300px; height: 30px;"></div> | ||
| - | ||
| - <form><textarea id="code2" name="code2"> | ||
| - I am another file! You can yank from my neighbor and paste here. | ||
| -</textarea></form> | ||
| +<div style="font-size: 13px; width: 300px; height: 30px;">Key buffer: <span id="command-display"></span></div> | ||
| <p>The vim keybindings are enabled by | ||
| including <a href="../keymap/vim.js">keymap/vim.js</a> and setting | ||
| the <code>vimMode</code> option to <code>true</code>. This will also | ||
| automatically change the <code>keyMap</code> option to <code>"vim"</code>.</p> | ||
| +<p><strong>Features</strong></p> | ||
| + | ||
| +<ul> | ||
| + <li>All common motions and operators, including text objects</li> | ||
| + <li>Operator motion orthogonality</li> | ||
| + <li>Visual mode - characterwise, linewise, partial support for blockwise</li> | ||
| + <li>Full macro support (q, @)</li> | ||
| + <li>Incremental highlighted search (/, ?, #, *, g#, g*)</li> | ||
| + <li>Search/replace with confirm (:substitute, :%s)</li> | ||
| + <li>Search history</li> | ||
| + <li>Jump lists (Ctrl-o, Ctrl-i)</li> | ||
| + <li>Key/command mapping with API (:map, :nmap, :vmap)</li> | ||
| + <li>Sort (:sort)</li> | ||
| + <li>Marks (`, ')</li> | ||
| + <li>:global</li> | ||
| + <li>Insert mode behaves identical to base CodeMirror</li> | ||
| + <li>Cross-buffer yank/paste</li> | ||
| +</ul> | ||
| + | ||
| <p>Note that while the vim mode tries to emulate the most useful features of | ||
| vim as faithfully as possible, it does not strive to become a complete vim | ||
| implementation</p> | ||
| @@ -69,13 +84,6 @@ | ||
| matchBrackets: true, | ||
| showCursorWhenSelecting: true | ||
| }); | ||
| - var editor2 = CodeMirror.fromTextArea(document.getElementById("code2"), { | ||
| - lineNumbers: true, | ||
| - mode: "text/x-csrc", | ||
| - vimMode: true, | ||
| - matchBrackets: true, | ||
| - showCursorWhenSelecting: true | ||
| - }); | ||
| var commandDisplay = document.getElementById('command-display'); | ||
| var keys = ''; | ||
| CodeMirror.on(editor, 'vim-keypress', function(key) { | ||
| @@ -36,6 +36,7 @@ | ||
| <input type="hidden" id="download" name="download" value="codemirror-compressed.js"/> | ||
| <p>Version: <select id="version" onchange="setVersion(this);" style="padding: 1px;"> | ||
| <option value="http://codemirror.net/">HEAD</option> | ||
| + <option value="http://marijnhaverbeke.nl/git/codemirror?a=blob_plain;hb=4.4.0;f=">4.4</option> | ||
| <option value="http://marijnhaverbeke.nl/git/codemirror?a=blob_plain;hb=4.3.0;f=">4.3</option> | ||
| <option value="http://marijnhaverbeke.nl/git/codemirror?a=blob_plain;hb=4.2.1;f=">4.2</option> | ||
| <option value="http://marijnhaverbeke.nl/git/codemirror?a=blob_plain;hb=4.2.0;f=">4.2</option> | ||
| @@ -123,6 +124,7 @@ | ||
| <option value="http://codemirror.net/mode/javascript/javascript.js">javascript.js</option> | ||
| <option value="http://codemirror.net/mode/jinja2/jinja2.js">jinja2.js</option> | ||
| <option value="http://codemirror.net/mode/julia/julia.js">julia.js</option> | ||
| + <option value="http://codemirror.net/mode/kotlin/kotlin.js">kotlin.js</option> | ||
| <option value="http://codemirror.net/mode/livescript/livescript.js">livescript.js</option> | ||
| <option value="http://codemirror.net/mode/lua/lua.js">lua.js</option> | ||
| <option value="http://codemirror.net/mode/markdown/markdown.js">markdown.js</option> | ||
| @@ -63,7 +63,7 @@ | ||
| <section class=first id=overview> | ||
| <h2 style="position: relative"> | ||
| User manual and reference guide | ||
| - <span style="color: #888; font-size: 1rem; position: absolute; right: 0; bottom: 0">version 4.3.0</span> | ||
| + <span style="color: #888; font-size: 1rem; position: absolute; right: 0; bottom: 0">version 4.4.0</span> | ||
| </h2> | ||
| <p>CodeMirror is a code-editor component that can be embedded in | ||
| @@ -797,9 +797,15 @@ <h3 id=modloader>Module loaders</h3> | ||
| <dt class=command id=command_deleteLine><code><strong>deleteLine</strong></code><span class=keybinding>Ctrl-D (PC), Cmd-D (Mac)</span></dt> | ||
| <dd>Deletes the whole line under the cursor, including newline at the end.</dd> | ||
| - <dt class=command id=command_delLineLeft><code><strong>delLineLeft</strong></code><span class=keybinding>Cmd-Backspace (Mac)</span></dt> | ||
| + <dt class=command id=command_delLineLeft><code><strong>delLineLeft</strong></code></dt> | ||
| <dd>Delete the part of the line before the cursor.</dd> | ||
| + <dt class=command id=command_delWrappedLineLeft><code><strong>delWrappedLineLeft</strong></code><span class=keybinding>Cmd-Backspace (Mac)</span></dt> | ||
| + <dd>Delete the part of the line from the left side of the visual line the cursor is on to the cursor.</dd> | ||
| + | ||
| + <dt class=command id=command_delWrappedLineRight><code><strong>delWrappedLineRight</strong></code><span class=keybinding>Cmd-Delete (Mac)</span></dt> | ||
| + <dd>Delete the part of the line from the cursor to the right side of the visual line the cursor is on.</dd> | ||
| + | ||
| <dt class=command id=command_undo><code><strong>undo</strong></code><span class=keybinding>Ctrl-Z (PC), Cmd-Z (Mac)</span></dt> | ||
| <dd>Undo the last change.</dd> | ||
| @@ -815,28 +821,28 @@ <h3 id=modloader>Module loaders</h3> | ||
| <dd>Redo the last change to the selection, or the last text change if | ||
| no selection changes remain.</dd> | ||
| - <dt class=command id=command_goDocStart><code><strong>goDocStart</strong></code><span class=keybinding>Ctrl-Up (PC), Cmd-Up (Mac)</span></dt> | ||
| + <dt class=command id=command_goDocStart><code><strong>goDocStart</strong></code><span class=keybinding>Ctrl-Up (PC), Cmd-Up (Mac), Cmd-Home (Mac)</span></dt> | ||
| <dd>Move the cursor to the start of the document.</dd> | ||
| <dt class=command id=command_goDocEnd><code><strong>goDocEnd</strong></code><span class=keybinding>Ctrl-Down (PC), Cmd-End (Mac), Cmd-Down (Mac)</span></dt> | ||
| <dd>Move the cursor to the end of the document.</dd> | ||
| - <dt class=command id=command_goLineStart><code><strong>goLineStart</strong></code><span class=keybinding>Alt-Left (PC), Cmd-Left (Mac), Ctrl-A (Mac)</span></dt> | ||
| + <dt class=command id=command_goLineStart><code><strong>goLineStart</strong></code><span class=keybinding>Alt-Left (PC), Ctrl-A (Mac)</span></dt> | ||
| <dd>Move the cursor to the start of the line.</dd> | ||
| <dt class=command id=command_goLineStartSmart><code><strong>goLineStartSmart</strong></code><span class=keybinding>Home</span></dt> | ||
| <dd>Move to the start of the text on the line, or if we are | ||
| already there, to the actual start of the line (including | ||
| whitespace).</dd> | ||
| - <dt class=command id=command_goLineEnd><code><strong>goLineEnd</strong></code><span class=keybinding>Alt-Right (PC), Cmd-Right (Mac), Ctrl-E (Mac)</span></dt> | ||
| + <dt class=command id=command_goLineEnd><code><strong>goLineEnd</strong></code><span class=keybinding>Alt-Right (PC), Ctrl-E (Mac)</span></dt> | ||
| <dd>Move the cursor to the end of the line.</dd> | ||
| - <dt class=command id=command_goLineLeft><code><strong>goLineLeft</strong></code></dt> | ||
| + <dt class=command id=command_goLineLeft><code><strong>goLineLeft</strong></code><span class=keybinding>Cmd-Left (Mac)</span></dt> | ||
| <dd>Move the cursor to the left side of the visual line it is on. If | ||
| this line is wrapped, that may not be the start of the line.</dd> | ||
| - <dt class=command id=command_goLineRight><code><strong>goLineRight</strong></code></dt> | ||
| + <dt class=command id=command_goLineRight><code><strong>goLineRight</strong></code><span class=keybinding>Cmd-Right (Mac)</span></dt> | ||
| <dd>Move the cursor to the right side of the visual line it is on.</dd> | ||
| <dt class=command id=command_goLineUp><code><strong>goLineUp</strong></code><span class=keybinding>Up, Ctrl-P (Mac)</span></dt> | ||
| @@ -37,6 +37,7 @@ | ||
| <li><a href="http://cargocollective.com/">Cargo Collective</a> (creative publishing platform)</li> | ||
| <li><a href="https://developers.google.com/chrome-developer-tools/">Chrome DevTools</a></li> | ||
| <li><a href="http://clickhelp.co/">ClickHelp</a> (technical writing tool)</li> | ||
| + <li><a href="http://codeworld.info/">CodeWorld</a> (Haskell playground)</li> | ||
| <li><a href="http://complete-ly.appspot.com/playground/code.playground.html">Complete.ly playground</a></li> | ||
| <li><a href="http://www.crossui.com/">CrossUI</a> (cross-platform UI builder)</li> | ||
| <li><a href="http://rsnous.com/cruncher/">Cruncher</a> (notepad with calculation features)</li> | ||
| @@ -123,6 +124,7 @@ | ||
| <li><a href="http://www.quivive-file-manager.com">Quivive File Manager</a></li> | ||
| <li><a href="http://rascalmicro.com/docs/basic-tutorial-getting-started.html">Rascal</a> (tiny computer)</li> | ||
| <li><a href="https://www.realtime.io/">RealTime.io</a> (Internet-of-Things infrastructure)</li> | ||
| + <li><a href="https://cloud.sagemath.com/">SageMathCloud</a> (interactive mathematical software environment)</li> | ||
| <li><a href="https://chrome.google.com/webstore/detail/servephp/mnpikomdchjhkhbhmbboehfdjkobbfpo">ServePHP</a> (PHP code testing in Chrome dev tools)</li> | ||
| <li><a href="https://www.shadertoy.com/">Shadertoy</a> (shader sharing)</li> | ||
| <li><a href="http://www.sketchpatch.net/labs/livecodelabIntro.html">sketchPatch Livecodelab</a></li> | ||
| @@ -29,6 +29,20 @@ | ||
| <h2 id="v4">Version 4.x</h2> | ||
| + <p class="rel">21-07-2014: <a href="http://codemirror.net/codemirror-4.4.zip">Version 4.4</a>:</p> | ||
| + | ||
| + <ul class="rel-note"> | ||
| + <li><strong>Note:</strong> Some events might now fire in slightly | ||
| + different order (<code>"change"</code> is still guaranteed to fire | ||
| + before <code>"cursorActivity"</code>)</li> | ||
| + <li>Nested operations in multiple editors are now synced (complete | ||
| + at same time, reducing DOM reflows)</li> | ||
| + <li>Visual block mode for <a href="../demo/vim.html">vim</a> (<C-v>) is nearly complete</li> | ||
| + <li>New mode: <a href="../mode/kotlin/index.html">Kotlin</a></li> | ||
| + <li>Better multi-selection paste for text copied from multiple CodeMirror selections</li> | ||
| + <li>Full <a href="https://github.com/marijnh/CodeMirror/compare/4.3.0...4.4.0">list of patches</a>.</li> | ||
| + </ul> | ||
| + | ||
| <p class="rel">23-06-2014: <a href="http://codemirror.net/codemirror-4.3.zip">Version 4.3</a>:</p> | ||
| <ul class="rel-note"> | ||
| @@ -85,7 +85,7 @@ | ||
| </script> | ||
| <div style="position: relative; margin: 1em 0;"> | ||
| <a class="bigbutton left" href="http://codemirror.net/codemirror.zip">DOWNLOAD LATEST RELEASE</a> | ||
| - <div><strong>version 4.3</strong> (<a href="doc/releases.html">Release notes</a>)</div> | ||
| + <div><strong>version 4.4</strong> (<a href="doc/releases.html">Release notes</a>)</div> | ||
| <div>or use the <a href="doc/compress.html">minification helper</a></div> | ||
| <div style="position: absolute; top: 0; right: 0; text-align: right"> | ||
| <span class="bigbutton right" onclick="document.getElementById('paypal').submit();">DONATE WITH PAYPAL</span> | ||
Showing you all comments on commits in this comparison.
|
This seems to work very well (tested in a mixed mode within PHP, JS, HTML and general text areas). All works as expected, only adding single ' and " chars in 'general' text areas. It also fixes another problem I discovered - when adding attributes on HTML tags, if the cursor is flush to the closing Only comment I would have is, should this simply be restricted to apostrophes? As even in general text I'd imagine users want a closing double quote? |
|
It also addresses a problem where, when closing a previously unclosed string (with either quote type), the addon would autoclose the closing quote, which is annoying. Thus, I've also enabled it for double quotes. |
|
Ah, OK. Well I'm very happy, so will close my PR. Many thanks :) |
|
This needs to check if vim.marks['<'] is defined, otherwise selecting text then pressing esc on newly created editor instance throws. |
|
That was my bad in a later change. Vim mode should have set marks any time selection changes because of the mouse. Fixed in 29be39a |