-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Discussion: Why do I need this plugin if I have &keymap
?
#35
Comments
Hi @doronbehar, I cannot really list advantages (if there are any) of this plugin before
And of course custom rules for layout switching, but I am afraid that nobody really uses them, except me :) I use them to seamlessly edit custom dictionaries like it's shown in the docs. |
O.K, I have been thinking a lot about this subject, I read
|
|
Great, now I understand. As for Normal mode assistance, I'm not sure I understand how it's supposed to work. Take the following example:
If my understanding is correct, and my configuration is O.K, than I should be able to do so without switch layout after pressing let g:XkbSwitchKeymapNames = {'il' : 'hebrew'}
let g:XkbSwitchAssistNKeymap = 1
let g:XkbSwitchAssistSKeymap = 1 But I doesn't work, hope you could help me set it up. |
Try with let g:XkbSwitchDynamicKeymap = 1 added. By some reason it does not work for me too, when it's not set. |
Ok, now I see how keymap assistance must work. Actually it's written in docs but it was surprisingly uneasy to remember how I implemented it and how it must work. There are two cases:
I do not remember why these approaches map to different objects, probably it was the simplest possible implementation, or I just slightly mis-implemented this. |
Great, Experiment 1: Vanilla VimLet's take a look at what happens when you perform the following when no plugins or settings are loaded:
You should encounter the following confusion: you get Experiment 2: Vim with
|
What you have described is what I am really getting in my Vim too (except I have custom signalling for old Powerline plugin, not airline, but see below). And, surprisingly... what I am expecting to be. Actually, I do not see any confusion... Because the main indicator for me is not any plugin-based flag, but system tray! When you're talking about confusion with So I'm using the system tray icon as the main source of the layout info. Moreover, in my version of Powerline status icon (see an article in my blog about its implementation, though it's written in Russian) the icon is not shown in Insert Mode, because it is not relevant, as you correctly stated this! In other words, I regard the keymap icon in the Powerline/airline only as a hint what layout will be used for searching chars/words in Normal Mode only. The main info about layout is still the system tray icon. So I think that airline would better switch this off too in Insert Mode. However, probably it makes sense to reset keymap when inserting Insert Mode as you proposed. So I'll look at this, however it won't anyway fix initial state in Insert Mode when layout is still unknown. |
Some addition. Answers to the 2 questions:
|
I'm afraid you misunderstood me regarding the What I meant was, that during the experiments above, you will be checking both the system tray indicating the system's keyboard layout ( As for your answer to my 1st question:
|
Now I remember why I supposed Vim's status line indicator to be useless in Insert Mode. Because it must show system layout, which can be changed during user's input, but Vim is unable to catch this system event and the indicator won't change. The only reasonable solution here seems to be timer-based polling, but this is ugly. However they could implement polling in airline. I have little time now, so I'll try briefly to answer your questions (I will get back to this after weekends):
|
Sorry for the delay, would you like to keep on with the conversation?
|
Yes! I remember that we were talking about |
Well, when I first started this conversation I was confused regarding this plugin and whether it is actually filling a missing gap in vim's design but since you are now mentioning that you don't use the vanilla I think we both learned something from this conversation. |
Yes, I learned a lot about But if you still have questions regarding implementation of this plugin (not how it compares to keymap!), please do not hesitate to ask me! Thank you! |
You Too! Cheers :)
|
Hello @lyokha,
I encountered your plugin while I saw it's extension on airline and I'm very impressed by it's features and documentation but I'm not sure I totally understand why would I need it.
Up until now, I used the vanilla
&keymap
setting of Vim and it was always enough for me. It even provides assistance in Normal mode as your plugin suggests to provide it as well (haven't succeeded yet in configuring it on my machine and withil
keyboard layout).One feature though which seems to be very promising is Custom keyboard layout switching rules. Vanilla Vim doesn't provides it I'm sure.
What am I missing?
The text was updated successfully, but these errors were encountered: