Reputation: 369
I am using 2 keyboard layouts: russian and english. I have the following in my .vimrc:
set keymap=russian-jcukenwin
set iminsert=0
The problem is that some of my files are opened with russian layout turned on and some are opened with english layout which I want to be default. (Search and normal mode commands are entered in english by default which is fine.)
May be this is connected with mkview/loadview autocommand but I can't find it out.
au BufWritePre *.* mkview
autocmd BufRead *.* silent loadview
Is there a way to force english layout by default?
Upvotes: 1
Views: 2722
Reputation: 196906
From :help :mkview
:
The output of ":mkview" contains these items:
[...]
3. Restore mappings, abbreviations and options local to the window if
'viewoptions' contains "options" or "localoptions". For the options it
restores only values that are local to the current buffer and values local
to the window.
[...]
Both keymap
and iminsert
are buffer-local options and options
is part of the default value of viewoptions
.
Upvotes: 1