# CodeMirror: Vim bindings demo

## Vim bindings demo

#include "syscalls.h" /* getchar: simple buffered version */ int getchar(void) { static char buf[BUFSIZ]; static char *bufp = buf; static int n = 0; if (n == 0) { /* buffer is empty */ n = read(0, buf, sizeof buf); bufp = buf; } return (--n >= 0) ? (unsigned char) *bufp++ : EOF; } I am another file! You can yank from my neighbor and paste here.

The vim keybindings are enabled by including keymap/vim.js and setting the `vimMode` option to `true`. This will also automatically change the `keyMap` option to `"vim"`.

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