On Fri, Jan 1, 2016 at 4:35 PM, <[email protected]> wrote:
> Last night, just at the New Year, I have discovered for myself a stenotyping
> with Plover:
> http://stenoknight.com/wiki/FAQ
> http://www.openstenoproject.org/
> http://stenoknight.com/kws.html
> and I think it is great!
>
> I do not need or want to learn stenotyping in full (at least because it does
> not exist in my native language), but I think that it is a very good idea to
> use customizable chords (that is two or more usual keyboard keys pressed at
> the same time) in Vim to launch some commands or print some chunk ot text.
>
> The first such chord, that could save for me a lot of time while typing
> cyrillics would be to simultaneously press, say, "о" and "н" keys in insert
> mode to go to the nomal mode and switch the keyboard layout to some English
> layout (for example with the setxkbmap utility).
>
> Another very useful chord for me would be to simultaneously press, say, "i"
> and "k" keys to return to the insert mode and switch the keyboard layout back
> to the cyrillic one.
>
Vim gets its key in "cooked" mode. Even gvim, which can distinguish
its keys and chords a little more subtly than Console Vim can, gets
its key in a rather standard manner. This means that keys other than
Shift, Ctrl, Alt, and, on the Mac, Cmd, cannot be used as key
modifiers; conversely, the key modifiers just named cannot be used
_except_ as key modifiers. If you hit i and k at the same time, then
depending on which one of them was got by the keyboard a minuscule
fraction of a second before or after the other, you'll get either ik
(start Insert mode and insert the letter k or whatever is langmapped
to it) or ki (move one line up then start Insert mode). You may set a
multicharacter {lhs} in a mapping, but even then, with the example you
give, you'd get either "он" (which, in Russian, would conflict with
e.g. the personal pronoun meaning "he") or "но" (which would conflict
with the conjunction meaning "but"). A mapping triggered by the one
would not recognize the other.
Most of the "printing" keys already have a function: in Insert mode
they of course insert a character into the text, and even in Normal
mode, the unassigned printing keys are few and far between. The same
applies to the "control" chords of these printing characters, of which
only Ctrl-A to Ctrl-Z (which are the same as Ctrl-a to Ctrl-z), plus
Ctrl-@ (Null), Ctrl-[ (Escape), Ctrl-\, Ctrl-], Ctrl-^, Ctrl-_ and
Ctrl-? (the only ones which have a representation in ASCII) can be
sensed by Vim. For this reason, I recommend to concentrate on the F
keys (with or without Shift, and with the exception of F1 = Help and
F10 = Menu) for the {lhs} of mappings, except when the intentionally
replacing an existing binding with a similar but slightly different
function, e.g. with
map j gj
map k gk
to move up or down by screen lines with j and k, leaving <Up> and
<Down> to move by file lines.
Best regards,
Tony.
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.