disabling global-hl-mode in visual-mode

Tim Harper timcharper at gmail.com
Fri Jun 17 19:35:26 CEST 2011


Hi Thomas,

One approach is to use the provided hooks to toggle it on and off when visual mode is entered / left.  viper vi-mode is entered again when vimpulse visual mode is left.

(setq vimtest-var 0)
(defun vimtest ()
  (interactive)
  (setq vimtest-var (+ 1 vimtest-var)))

(defun vimtest-deactivate ()
  (interactive)
  (setq vimtest-var (- vimtest-var 1)))

(add-hook 'vimpulse-visual-state-hook 'vimtest)
(add-hook 'viper-vi-state-hook 'vimtest-deactivate)

Tim

On Jun 17, 2011, at 11:08 , Thomas Hisch wrote:

> Hey
> 
> I want to disable global-hl-line-mode in visual mode, but adding global-hl-mode to  vimpulse-visual-local-vars didn't help.
> 
> Any ideas?
> 
> (latest git version of vimpulse)
> 
> Regards
> Tom
> _______________________________________________
> 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