disabling global-hl-mode in visual-mode

Thomas Hisch t.hisch at gmail.com
Fri Jun 17 20:05:09 CEST 2011


Thx for the example, but it does't work as expected, just consider multiple
buffers, vi state hook is also executed when i switch for example from emacs
state to vi state,..  All this leads to negative values of vimtest-var.

I thought of using  vimpulse-visual-local-vars because, when looking at its
definition I looks like exactly what I want:

 (viper-deflocalvar vimpulse-visual-local-vars
  '(cua-mode
    mark-active
    transient-mark-mode
    zmacs-regions)
  "System variables that are reset for each Visual session.")

Or am I wrong ?

Regards
Thomas



On Fri, Jun 17, 2011 at 7:35 PM, Tim Harper <timcharper at gmail.com> wrote:

> 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
>
>
> _______________________________________________
> implementations-list mailing list
> implementations-list at lists.ourproject.org
> https://lists.ourproject.org/cgi-bin/mailman/listinfo/implementations-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.ourproject.org/pipermail/implementations-list/attachments/20110617/3f55f9b5/attachment.htm 


More information about the implementations-list mailing list