stefanoborini / vai

Vai editor. A text based IDE similar to vim, in python.
245 stars 16 forks source link

:commands design and python #180

Open stefanoborini opened 9 years ago

stefanoborini commented 9 years ago

I have the desire to interpret :commands (e.g. :read or :write or :wq) as invocation of python routines where the parentheses and quotes are implicit. In other words, one can write :read("file") for :read file.

With this vision in place, we could allow plugins to provide new commands, for example

:git show

would be intepreted as :git("show"), and

:git checkout master

would be interpreted as :git("checkout", "master"). Both notations would work. However, with the notation without parentheses, all entries are passed as strings. The only way to pass numeric values is to call with the parenthesis notation.

We need to check how this would work with the old vim mode. We don't have to imitate vim 100%. We need to improve vim, trying to stick as close as possible to traditional syntax, but being open to break the tradition if needed.