diff --git a/demo/vim.html b/demo/vim.html index f92ff9e6d80aba6703a2847be7e757ceadd34d80..cc616759f0e53e385083b862003c9604d98823b5 100644 --- a/demo/vim.html +++ b/demo/vim.html @@ -45,17 +45,32 @@ int getchar(void) 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 @@ implementation</p> 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) {