Any tutorial on how to create a vim-like editor?

I was an active user of Vim and recently became interested in how it works.

Does anyone know if there is a tutorial on the basics of converting a regular text editor with Vi / m capability? The programming language does not matter; I am a pretty experienced programmer.

I found the following resources:

+5
source share
3 answers

I think you should first know that VI / VIM is actually two parts. One of them is a visual editor called vi, and the other is an editor with one layer called ed.

vi , ed (editor). ex-, , vi .

ex / ed. ed Vi ex . vi , . , , , :

:100 // Go to line 100, ex mode (ed)
100G // Go to line 100, normal mode(vi)

:.,5d // Delete 5 lines, ex mode (ed)
5dd   // Delete 5 lines, normal mode (vi)

..

vi Vim O'Reilly:

alt text

+5

Vi, , , () : - Esc : - ,

, Vi , , , , , .

, , .

. , , / . , , .

The main command mode syntax is inherited from ed / sed editors so you can look at it (or documents).

In general, it is not massive work to get a surface implementation that is very similar to vi. But doing it really well is another matter. I would advise you to seriously consider using the excellent Vim ( http://www.vim.org/ ).

+1
source

All Articles