I have these idea for a long time...
first of all, Vim is great, but not prefect. but it really need keep
its
compatible with old version and the old vi. but we can do something
like
Vim++ or something else. I have some idea.
first, we must implement a script language has full feature, just like
python,
ruby or perl. we only has two CONSTRAINTS:
- it should be fast. so we use byte-compiler, (and JIT-compiler, if
possible).
- the most important thing: it should smoothly mix with C code. It
should
can replace any code write by C. we only write C code in compiler/
vmachine
and the place need speed. (that's why we need it fast).
that is, all function of this framework are "shots" can replace by
four kind
of implement: hard-code Binary, Binary dynamic library, text script
code and
bit-code script. we can easily change a command line in script, or
catch any
event in script. we can even use script to change all things in Vim.
then, we "insert" the old code of Vim into this framework, throw the
dirty
ones, keep the graceful ones.
------
in development this framework (it just another branch of Vim), I think
the
most important thing is keep code simple and extensible. so I have
some of
idea:
- New One is command-driven, not mode-driven. operator "i" is just
make us
in a temporary state of Vim. We should decrease the amount of this
state.
we can merge cmdline mode and insert mode into one, and add a list
mode,
and delete the quick-fix and locate window, use list mode to
replace them.
- Keep command simple. all command has same format, all command are
in shot,
we can "hook" them in script, so we can change the implement of
it. all
function has only one "hook-able" interface to offer service. so
we can
hook "undo" to hand undo event, no matter user use ":undo" or "u"
operator.
- all events has autocmd, we use it in script level. so it pass
script
function argument, not command or string. it can speed up autocmd.
- it contains a parser like yacc, we can parsed program and get some
information when get syntax-highlight. that means, we can make
true
"syntax" highlight: we can identify locale variable, function or
others,
Vim will contain a compiler-compiler :-)
new Vim has a core: compiler/virtual-machine and some service plug-in:
memory-manage,
text edit/format, parser/highlight. all service can be chained, and
implement
or modified by script.
in a word, new Vim contain three level: the C level, the script level
and the
command level. now *.vim also supported, but the most effective way to
extend
Vim is write new-style script for it.
I'm designing script language for months, but it so difficult that
maybe I'll
take years to implement. but it could be more graceful, fast,
consistency and
wide-use than current Vim. it just a hobby of mine, but if someone has
time
and/or energy, we can work together :-)
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---