Comments (18)
from vim-xkbswitch.
Hi, can you show output of command :imap
?
from vim-xkbswitch.
Can you apply this patch:
--- xkbswitch.vim 2017-02-17 16:33:48.136597910 +0300
+++ /home/lyokha/.vim/plugin/xkbswitch.vim 2017-02-20 14:59:49.022244175 +0300
@@ -323,7 +323,9 @@
redir => mappingsdump
silent imap
redir END
- let mappings = split(mappingsdump, '\n')
+ let ff = empty(&ffs) ? &ff : split(&ffs, ',')[0]
+ let eol = ff == 'dos' ? '\r\n' : (ff == 'mac' ? '\r' : '\n')
+ let mappings = split(mappingsdump, eol)
let mappingskeys = {}
for mapping in mappings
let mappingskeys[split(mapping)[1]] = 1
and test again? And show what is your :imap
prints out?
from vim-xkbswitch.
from vim-xkbswitch.
Looks good at first glance, except for
<C-R>и *@<C-R>b
Here there is no i
at the beginning, but i suspect that you just missed it when copied and pasted the output, correct?
from vim-xkbswitch.
from vim-xkbswitch.
Please comment let g:XkbSwitchIMappings = ['ru']
in your .vimrc and run vim again, does it help?
from vim-xkbswitch.
from vim-xkbswitch.
ok, then the reason is in IMappings, then i need to carefully read through all your imap
's and find what kind of them the plugin does not parse well.
from vim-xkbswitch.
from vim-xkbswitch.
Yes, could you again disable let g:XkbSwitchIMappings = ['ru']
and show how looks output of :imap
in this case (it must be shorter).
from vim-xkbswitch.
from vim-xkbswitch.
I do not see any issues with imap translation, actually it works fine. Probably you have some wrong definitions of imaps in you .vimrc (see related solution here). Actually vim-xkbswitch calls command imap
when it translates IMappings: it makes it using Vim's command redir
which itself is not safe though. But it do it only once whereas you have multiple lines of the No mapping found message, and this is really strange.
from vim-xkbswitch.
from vim-xkbswitch.
Please try the next patch:
--- plugin/xkbswitch.vim 2017-02-20 21:32:22.476482300 +0300
+++ /home/lyokha/.vim/plugin/xkbswitch.vim 2017-02-20 22:13:26.640931328 +0300
@@ -340,6 +340,19 @@
continue
endif
let data = split(mapping)
+ if data[0] != 'i' || len(data) < 3
+ echoerr "Line '".mapping."' does not look like an imap ".
+ \ "value, another plugin is supposedly ".
+ \ "doing 'redir'!"
+ continue
+ endif
+ let mapval = maparg(data[1], 'i')
+ if empty(mapval)
+ echoerr "Line '".mapping."' does not look like an imap ".
+ \ "value, another plugin is supposedly ".
+ \ "doing 'redir'!"
+ continue
+ endif
" do not duplicate <Plug> and <SNR> mappings
" (when key starts with '<Plug>' or '<SNR>')
if match(data[1], '^\c\%(<Plug>\|<SNR>\)') != -1
I wonder if you'll see messages about parallel redir
.
from vim-xkbswitch.
Please try the new version, now it won't complain (because referring to redir was erroneous) and check by :imap
that all your maps got translated (including <ce>u
-> <ce>г
and <ce>w
-> <ce>ц
). If everything is OK then we can close the bug.
from vim-xkbswitch.
from vim-xkbswitch.
Thanks for cooperation!
from vim-xkbswitch.
Related Issues (20)
- Cannot switch layout while searching + cannot use shortcuts with modifier keys in insert mode HOT 6
- [question] how to change input method in insert mode? HOT 6
- xkb-switch triggered by neoclide Coc documentation float window HOT 2
- vim-xkbswitch does not remember the layout HOT 1
- Windows 10, gvim/nvim-qt, stopped working - how to debug/diagnose? HOT 3
- Unexpected output to textarea HOT 2
- Появление ошибок во время открытия файла HOT 15
- Switch layout when in normal mode HOT 5
- Sway support HOT 1
- Question. How can I get current layout? HOT 2
- How to use vim-xkbswitch with i3wm? HOT 2
- Bspwm Support HOT 1
- Не находит бинарник xkb-switch HOT 1
- Can't restore Normal mode keyboard layout when leaving search '/' mode HOT 6
- mapping duplicate for script local mapping HOT 10
- Keymap assistance in Normal mode not working HOT 8
- Не удается заставить работать на Ubuntu 22.10 HOT 5
- Does not work with lazy.nvim HOT 8
- Doesn't switch language when exiting Insert mode HOT 1
- How to make it work on wsl? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vim-xkbswitch.