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 <[email protected]> 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 [email protected]
https://lists.ourproject.org/cgi-bin/mailman/listinfo/implementations-list
_______________________________________________ implementations-list mailing list [email protected] https://lists.ourproject.org/cgi-bin/mailman/listinfo/implementations-list