blukat29 / vimedu

Learn basics of vim interactively.
MIT License
1 stars 1 forks source link

Showing text buffer #3

Closed blukat29 closed 10 years ago

blukat29 commented 10 years ago

a.k.a. clipboard, or registers.

Vim has many registers. Most of them are named like a and b. And there is an unnamed buffer (actually named as "). This unnamed buffer is updated every time I execute the change, copy, or delete command.

Since this project is for beginners, just displaying the unnamed buffer will be enough. Major reason for showing register is to demonstrate that delete operation is actually cut operation.

In keymap/vim.js, is a private class Register. It has methods like setText(), toString() and so on. I can hook up a CodeMirror signal and pass its content thorugh signal argument.

blukat29 commented 10 years ago

22403dc does it.