TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Extensibility in Vim vs. Emacs

13 pointsby sjbachabout 16 years ago

3 comments

viraptorabout 16 years ago
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)<p>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 :)<p>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.
mustpaxabout 16 years ago
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:<p><pre><code> :'&#60;,'&#62;!cmd </code></pre> I've also found that you can accomplish a lot with a hastily recorded Vim macro. To start recording keystrokes into buffer "a":<p><pre><code> qa </code></pre> When you're done, hit "q" again and you're macro is saved. "@a" to execute macro.<p>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.<p>These days I'm writing Java in Eclipse, which just doesn't have the same feeling to it.
zcrar70about 16 years ago
Yi sounds like a good alternative to Vi and Emacs: the philosophy of Vi, with the extensibility of Emacs.<p>The catch? It's written in, and it's extension language is, Haskell (which is why I've never used it.)