You are not logged in.
Pages: 1
To use additional language in vim I can, say, use in ~/.vimrc:
set keymap=russian-jcukenwin
set iminsert=0OTOH, for the same purpose in X11 I have in /etc/X11/xorg.conf.d/10-evdev.conf"
Section "InputClass"
Identifier "evdev keyboard catchall"
MatchIsKeyboard "on"
MatchDevicePath "/dev/input/event*"
Driver "evdev"
Option "XkbLayout" "us, ru"
Option "XkbOptions" "grp:menu_toggle, grp_led:scroll"
EndSectionFor cases vim is used under X11 I'd want to have the only way (in particular - X11's one) for layout switching. Is it possible?
"I exist" is the best myth I know..
Offline
I see, all archers-vimmers use English only ![]()
It seems like vim uses symbols rather keyboard scancodes to process commands (and it is definite architecture flaw - probably just historical). As a result, there isn't transparent system-wide (and the only) way to deal with languages in vim under X11 . Am I right??
"I exist" is the best myth I know..
Offline
I'm not a vim expert and I have just started exploring vim key-mappings. I can point you to helpful (or not) tutorials.
Vim has some defined keyboard key names (http://vimdoc.sourceforge.net/htmldoc/i … #%3CNul%3E). The Menu key doesn't appear to be one of them. You should be able to map the Menu key when you are typing the map command by using the keystrokes "Ctrl-V", then "Menu ". This will put the escape code for the Menu key into the statement.
A short, English tutorial on Vim key-mapping is here: http://www.linux.com/archive/feed/54936.
A more complete English tutorial on key mapping is here: http://vim.wikia.com/wiki/Mapping_keys_ … 8Part_1%29.
You may have to surround your script with tests for the terminal or terminal emulator: "if $TERM=xterm... elseif $TERM=linux..." In my linux terminals the Menu key is not recognized by Vim, in xterm it is recognized.
Offline
Do you use gvim under X? You could use .gvimrc to set another layout then.
Offline
@thisoldman
Thanks for the refs. And I'm more saying about system-wide switching. I mean there is the only state of current layout in, say, terminal and in vim's insert (in all buffers/tabs/windows) and cmdline modes.
@OrangeMediumGreen
vim
"I exist" is the best myth I know..
Offline
I think this is what you are asking:
Is there a test for the current Xkblayout?
How do I start vim with the same keyboard setting?
An AUR package, xkblayout-state at https://aur.archlinux.org/packages.php?ID=33298, may help you with the first question.
I'm using the us(USA) keyboard only, so I haven't tested the program thoroughly. My limited test of it shows it works.
Offline
It seem the behaviour which I treat as expected and natural, isn' such for all others
And, of course, my English is far from to be perfect.
OK, let's try by example. Say, we have few apps opened: firefox (typing in text area), claws-mail (composing new message), geany (editing some file).. From "vim's POV" they all are in insert mode. OTOH, their commands don't clash with text input: at case not-qwerty layout is selected Ctrl-F will still try to find something. So, expected (by me) vim's behaviour is: current kbd layout does matter at insert and cmdline modes only. At, say, normal mode commands are processed independently of selected (I mean Option "XkbLayout" "us, ru"; Option "XkbOptions" "grp:menu_toggle, grp_led:scroll") layout.
Is my intention more clear now? ![]()
"I exist" is the best myth I know..
Offline
@student
You probably know more about this than I do, but if it helps I use loadkeys to remap Ctrl -> CapsLock in the console, and xmodmap to remap them under X11.
http://tldp.org/HOWTO/Keyboard-and-Cons … TO-15.html
http://linux.die.net/man/1/loadkeys
So if you want a russian language option in console vim then maybe try loadkeys. Put the line in your /etc/rc.local or something. This will also apply to your terminal so I'm not sure how this affects you or if it does at all. Like was suggested before, maybe you would have a "translator" key to switch between the two keymaps. That would be cool. Also a nice prank, since you're typing typing typing and now everything is russian ![]()
Offline
Real men use nano
Offline
Pages: 1