Vim bindings demo

x
 
1
#include "syscalls.h"
2
/* getchar:  simple buffered version */
3
int getchar(void)
4
{
5
  static char buf[BUFSIZ];
6
  static char *bufp = buf;
7
  static int n = 0;
8
  if (n == 0) {  /* buffer is empty */
9
    n = read(0, buf, sizeof buf);
10
    bufp = buf;
11
  }
12
  return (--n >= 0) ? (unsigned char) *bufp++ : EOF;
13
}
14
Key buffer:

The vim keybindings are enabled by including keymap/vim.js and setting the keyMap option to vim.

Features

For the full list of key mappings and Ex commands, refer to the defaultKeymap and defaultExCommandMap at the top of keymap/vim.js.

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