views:

124

answers:

1

Hi, I obtained a git clone of vimpulse and followed the instructions for installation. It basically says to put (require 'vimpulse) in my .emacs file - but this will start viper/vimpulse upon startup, so I tried to have vimpulse load only if I invoke viper-mode with (add-hook 'viper-mode-hook (lambda () (require 'vimpuse)). But when I do this visual mode does not work (tries to open file instead), so instead I now have something like (defun vimpulse-on () (interactive) (require 'vimpulse)). After that to toggle on and off I use C-z. Does that about sound right? So once vimpulse is loaded there's no equivalent of M-x viper-go-away and instead it's suspended until I hit C-z again... Also, any general tips with using viper/vimpulse would be appreciated! Thanks much in advance.

Edit: syntax error corrected. What I had tried was (add-hook 'viper-mode-hook (lambda () (require 'vimpulse)), which does not enable visual mode when viper-mode is started. v in normal-mode appears to be mapped to find-file (or ido-find-file).

+1  A: 
(add-hook 'viper-load-hook
   (lambda () (require 'vimpulse))

Just load vimpulse in the viper-load-hook.

Tao Peng
Actually this is what I tried (sorry, syntax error in my post), I did add the `require` statement to `viper-mode-hook`, but then `visual-mode` does not work when `viper-mode` is enabled. And loading `vimpulse` will already load `viper-mode`.
Stephen
I can't find `viper-mode-hook' in my Emacs 23.2.1. Make sure you have loaded vimpulse in the right place (or manually), then check the function `vimpulse-visual-toggle-normal' which should be bound to v in vimpulse, if not found, make sure you have the latest vimpulse at http://www.emacswiki.org/emacs/vimpulse.el
Tao Peng