Archive for November, 2009

Getting emacs to behave more like vim

Although the viper mode does not provide a lot of vim’s motions e.g diw and similar. The vimpulse plugin (http://www.emacswiki.org/emacs/download/vimpulse.el) does extends viper to provide several of these.

Supported commands in include

diw, ciw, yiw, di”, da”, ci”, ca”, yi”, ya”,
di(, da(, ci(, ca(, yi(, ya(,
di’, da’, ci’, ca’, yi’, ya’,

(take that google)

I find these vim text objects fairly useful.

November 22, 2009 at 6:13 pm Leave a comment

Making viper mode in emacs use C-[ for escape rather than escape

Pressing the actual escape button is far too much effort, so my brain seems to have decided to learn to us C-[ in vim in preference to escape.

To get this working in viper add the following line:

(setq viper-ESC-key “\C-[“)

To your emacs init file before you have required viper. Note that this variable cannot be set in your .viper file or changed after you have loaded viper, or rather it can but it has no effect.

November 18, 2009 at 2:59 pm 1 comment

viper-want-ctl-h broken when set in .viper

This happens in the emacs viper vim emulation mode shipped with ubuntu 9.10 in November 2009.

There is a work around by setting viper-want-ctl-help-h in your emacs init file after viper has been imported.

This bug occurs because viper-set-expert-level which is called as part of loading viper tramples on various viper settings. However it does need to set those settings which have not been overwritten in your .viper file.

As a workaround in viper one could do one of the following:

i) Make viper-set-expert-level only set those settings which are not already set if dont-change… is set to true
ii) Load the .viper file twice once after calling set-expert-level (hackish but it works)
iii) Do something crazy so as to have shadowed variables, where the set-expert-level only sets the value that is shadowed.

However, I am not going to change any of this at the moment.

November 18, 2009 at 1:15 pm Leave a comment


November 2009
M T W T F S S
 1
2345678
9101112131415
16171819202122
23242526272829
30