[implementations-list] Early implementation of new VIM-like mode

Alessandro Piras laynor at gmail.com
Wed Jul 1 20:15:21 CEST 2009


Follow up: the most interesting thing about your approach is that you don't
use emacs keymaps.
Could you explain me how it works (a short summary is ok) ?

2009/7/1 Alessandro Piras <laynor at gmail.com>

> Hello Frank,
> and thanks for the nice comments. I'm going to take a look at your code
> really soon, and, to tell the whole truth, out of frustration from
> navigating in kludge-world, I opened a file today, yavimc.el, that stands
> for yet another vim clone. I wasn't still sure I wanted to yell it to the
> world, but yeah, I think writing something from scratch is maybe the right
> solution. I don't know if it's the "productive" solution. Maybe it isn't.
> But still I don't like kludge world, and I'm not earning money from this,
> so personal interest and enjoyment comes first. This said, can I join? XD
> I was trying vim-mode just now, and I must say it's very responsive, and
> handles the basic things nicely :) I'll take a look at the code now!
> Cheers,
> Alessandro
>
>
> 2009/7/1 Frank Fischer <frank.fischer at mathematik.tu-chemnitz.de>
>
> Hallo,
>>
>> the recent development of vimpulse encouraged me to think again about a
>> new VIM-mode for Emacs.  I'm one of those who think that implementing a
>> new vim-mode from scratch might be easier and more powerful than
>> extending viper.
>>
>> In this post I'd like to present you an early result of my attempts.
>> Currently I call is just 'vim-mode', but that name is not important.
>> The code is very modular (I hope) and built around an own keymap
>> structure.  This means vim-mode does not use the default Emacs-keymaps
>> but handles all events within its own data structures.
>>
>> The handling of keymaps is an independent subsystem.  Commands and
>> motions can be defined independently and operators (commands with
>> motions, I call them 'complex' commands) can be combined with arbitrary
>> motions.  In fact, a motion is just a function returning one or two
>> positions in the buffer.
>>
>> Furthermore, vim-mode supports mapping of commands.  This is a quiet
>> powerful feature: many more complicated commands can be defined by
>> simple mappings without the need of an own implementation.  For example
>> the command "x" is defined
>>
>> (vim:def-map "x" "dl")
>>
>> and "O" is defined
>>
>> (vim:def-map "O" (kbd "0 i RET <up> TAB"))
>>
>> look at the file 'vim-maps.el' for more examples.  (OK, I'm not sure if
>> those definitions are correct in all cases, but they seem to work OK
>> for me).
>>
>> You can find the code at
>>
>> http://www.tu-chemnitz.de/~fifr/downloads/vim-mode.tgz<http://www.tu-chemnitz.de/%7Efifr/downloads/vim-mode.tgz>
>>
>> and a mercurial repository at
>>
>> http://www.tu-chemnitz.de/~fifr/repos/vim-mode<http://www.tu-chemnitz.de/%7Efifr/repos/vim-mode>
>>
>> Just open the file 'vim.el' and evaluate it.  Don't forget to read the
>> comments in 'vim.el'
>>
>> I hope that this code can convince some of you of this approach in favor
>> for extending viper (although vimpulse is really great - I use it every
>> day, especially when developing vim-mode ;) - I think vim-mode is worth
>> further development and as the potential to be even better than viper +
>> vimpulse).
>>
>> Any comments, suggestions or patches are very welcome.
>>
>> Greetings,
>> Frank
>>
>> _______________________________________________
>> implementations-list mailing list
>> implementations-list at lists.ourproject.org
>> https://lists.ourproject.org/cgi-bin/mailman/listinfo/implementations-list
>>
>
>


More information about the implementations-list mailing list