Hi, Thanks for bringing us the wonderful Evil mode. I noticed the following minor issues while using it. 1. After I did a 'git pull' today, I noticed most files/modes are opened with 'emacs' state by default, which wasn't the case before I pulled the updates. Is this intentional? I had to hack the function 'evil-initial-state-for-buffer' to open in 'normal' state by default. Is there an easier way? 2. In the following case, doing a "va(" or "vi(" doesn't work. (aaa "bb[]bb" aa) where [] is the cursor. Best Regards
On 2011-07-24 02:03 +0200, laputa5 wrote:
After I did a 'git pull' today, I noticed most files/modes are opened with 'emacs' state by default, which wasn't the case before I pulled the updates. Is this intentional?
Yes, but it's not permanent. I intend to give most Emacs modes vi bindings, but the more complex modes require some adaption. In the meantime, Emacs state is used in a number of cases to keep things minimally functional.
I had to hack the function 'evil-initial-state-for-buffer' to open in 'normal' state by default. Is there an easier way?
The state a mode comes up in can be changed with `evil-set-initial-state', e.g., (evil-set-initial-state 'Custom-mode 'normal) To view the default settings, inspect the following variables (with "C-h v"): `evil-emacs-state-modes', `evil-insert-state-modes' and `evil-motion-state-modes'. Modes not listed here come up in Normal state.
In the following case, doing a "va(" or "vi(" doesn't work. (aaa "bb[]bb" aa) where [] is the cursor.
Fixed in commit 6e74963. -- Vegard
In the following case, doing a "va(" or "vi(" doesn't work. (aaa "bb[]bb" aa) where [] is the cursor.
Fixed in commit 6e74963. Thanks for fixing this. It works great now.
The state a mode comes up in can be changed with `evil-set-initial-state', e.g.,
(evil-set-initial-state 'Custom-mode 'normal)
To view the default settings, inspect the following variables (with "C-h v"): `evil-emacs-state-modes', `evil-insert-state-modes' and `evil-motion-state-modes'. Modes not listed here come up in Normal state.
The problem I had was that Modes not listed here do NOT come up in Normal state, but in Emacs state. In fact, even those set to non-Emacs state with `evil-set-initial-state' come up in Emacs state. It is caused by that for some reason my recentf-mode is always on, and it always returns Emacs in `evil-initial-state-for-buffer'. so I changed the function a bit, but now I think about it, it's easier to just do the following, or remove it in the first place. (delete* 'recentf-mode evil-emacs-state-modes) Not sure if this is a rare case that's just specific to my configuration. It works great now. Best Regards.
On 2011-07-25 18:57 +0200, laputa5 wrote:
It is caused by that for some reason my recentf-mode is always on, and it always returns Emacs in `evil-initial-state-for-buffer'. so I changed the function a bit, but now I think about it, it's easier to just do the following, or remove it in the first place. (delete* 'recentf-mode evil-emacs-state-modes)
Thanks for the heads-up. Commit 5d2af9a removes recentf-mode from `evil-emacs-state-modes' and makes recentf-dialog-mode come up in Motion state. -- Vegard
participants (2)
-
laputa5 -
Vegard Øye