

Extensibility in Vim vs. Emacs - sjbach
http://items.sjbach.com/560/extensibility-in-vim-and-emacs

======
viraptor
That's a nice comparison - basically lists the reasons why I started looking
for something better after writing 2-3 vim plugins... (it only misses the
problem of integrating vim with external commands)

But then I found a really nice piece of software - Yi. It's a vim/emacs type
(yes - both!) type editor. It's written and extendable in haskell. The keymap
is implemented as a parser on user input, so keymap modules include vim (with
modes / simple ex mode), emacs and others. The code is very easy to understand
(I actually learnt haskell while patching it for my needs) and includes most
standard features - tabs, buffers, editing, some syntax files... even basic
ghci shell :)

It's not "ready" yet, but I would say it can be described as a "usable beta".
If someone really likes the vim idea of editing with modes and is disappointed
by vim's plugin model, then Yi is definitely worth a try.

------
mustpax
Extending Vim really is a pain if you're trying to stay within Vim. Your best
bet is to rely on piping output to other shell utilities to get the desired
behavior. :r!cmd reads output of given command into current file. After
selecting a set of lines with "V" you can pipe them through a shell command
like so:

    
    
      :'<,'>!cmd
    

I've also found that you can accomplish a lot with a hastily recorded Vim
macro. To start recording keystrokes into buffer "a":

    
    
      qa
    

When you're done, hit "q" again and you're macro is saved. "@a" to execute
macro.

Vim commands string together pretty easily, and I've done some serious
refactoring on good ol' C and ASM with this method back in the day.

These days I'm writing Java in Eclipse, which just doesn't have the same
feeling to it.

------
zcrar70
Yi sounds like a good alternative to Vi and Emacs: the philosophy of Vi, with
the extensibility of Emacs.

The catch? It's written in, and it's extension language is, Haskell (which is
why I've never used it.)

