diff options
author | Frédéric Mangano <fmang@mg0.fr> | 2022-08-03 18:04:54 +0900 |
---|---|---|
committer | fujiwarat <takao.fujiwara1@gmail.com> | 2022-08-03 18:04:54 +0900 |
commit | 934e3019b1f1e1bd7914d33064c0155e6700f8ba (patch) | |
tree | d767a5b8891afe20eebd28c4e1676c5155b6a63d /setup | |
parent | 3769df3e8d4eefabcb88b521f3c9e2658fc233ca (diff) | |
download | ibus-anthy-934e3019b1f1e1bd7914d33064c0155e6700f8ba.tar.gz |
Add the escape_to_latin command as a vi-cooperative cancel (#29)
When writing Japanese in Vim, everytime I switch from Insert mode back to
Normal mode, I need to also switch back the IBus input mode to Latin or
else Vim won’t take any of my input. This is kind fo annoying as key
sequences like `<Esc>:w` easily get wired into muscle memory.
For comparison, uim has got a vi-cooperative mode for that use case. See
<https://blog.myon.info/entry/2014/04/14/entry/> for illustration.
Here’s a new command which, when converting, behaves like cancel, but
otherwise switches to Latin and sends the Escape key. To make IBus
vi-cooperative, a user can map the Escape key to escape_to_latin instead
of cancel.
Diffstat (limited to 'setup')
-rw-r--r-- | setup/python2/anthyprefs.py | 1 | ||||
-rw-r--r-- | setup/python3/anthyprefs.py | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/setup/python2/anthyprefs.py b/setup/python2/anthyprefs.py index 5e3bade..c614491 100644 --- a/setup/python2/anthyprefs.py +++ b/setup/python2/anthyprefs.py @@ -276,6 +276,7 @@ _cmd_keys = [ 'predict', 'cancel', 'cancel_all', + 'escape_to_latin', 'reconvert', # 'do_nothing', diff --git a/setup/python3/anthyprefs.py b/setup/python3/anthyprefs.py index 33b2a31..404aa09 100644 --- a/setup/python3/anthyprefs.py +++ b/setup/python3/anthyprefs.py @@ -269,6 +269,7 @@ _cmd_keys = [ 'predict', 'cancel', 'cancel_all', + 'escape_to_latin', 'reconvert', # 'do_nothing', |