evindor / vim-rusmode

Bind pressing russian key in normal mode to toggle layout and repeat same key.
http://www.vim.org/scripts/script.php?script_id=4493
18 stars 2 forks source link

Linux #2

Open evindor opened 11 years ago

evindor commented 11 years ago

Сделать плагин рабочим в линуксе.

ZyX-I commented 11 years ago

There is no single “Linux” that you can add support for. I know at least four ways or programms that are able to switch keyboard layout, and users of them won’t like you for breaking what they have. Thus the only good thing you can do is to

  1. Take command name and arguments from a user-overridable option. Maybe create some shortcuts like if g:switcher_type is defined switcher command is taken from a dictionary, otherwise it first tries to take command string from g:switcher_command and then use default switcher.
  2. Add to documentation a list of ways to switch keyboard layouts on linux from command-line (duplicates data from the dictionary, but also holds some tips that make users able to detect which one they need exactly).
  3. It would be hard, but default switcher may use some heuristics.

And add support for different keymappings, us and ru layouts are not the only ones for both languages.