Am Tue, 16 Oct 2012 09:19:47 +0100 schrieb Christoph LANGE <[email protected]>:
Dear evil developers/users,
I would like to generally open all files of a certain type (org-mode) in vi state but make exceptions for a few individual files. Using file local variables didn't work.
I tried
Local Variables: eval: (evil-emacs-state) End:
but apparently the order of execution was the following:
1. load the file 2. apply the local variables, switching to Emacs state 3. here, or possibly before (2), switch buffer to org-mode 4. on seeing that org-mode is not in the list of evil-emacs-state-modes, switch to vi state
If this assumption is right, is there any way of opening individual files in Emacs state?
I think your assumptions are right and there is currently no way. But maybe the following patch could help. It defines a new variable `evil-this-buffer-initial-state' that can be set to some value != nil to overwrite the initial state in the current buffer. When set in a file variable it should do what you want. Best Frank