Skip to content
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

Error detected while processing function <SNR>180_tr_load: #23

Open
coresh opened this issue Aug 16, 2015 · 3 comments
Open

Error detected while processing function <SNR>180_tr_load: #23

coresh opened this issue Aug 16, 2015 · 3 comments

Comments

@coresh
Copy link

coresh commented Aug 16, 2015

vim running and :messages output :

vim-xkbswitch/plugin/xkbswitch.vim:126
Error detected while processing function 180_tr_load:
line 8:
E684: list index out of range: 0
E15: Invalid expression: data[0] == '<' || data[0] == '>'

@lyokha
Copy link
Owner

lyokha commented Aug 16, 2015

What is content of your file pointed by :echo g:XkbSwitchIMappingsTrData?

@coresh
Copy link
Author

coresh commented Aug 16, 2015

/home/admin/.vim/xkbswitch/xkbswitch.tr

cat /home/admin/.vim/xkbswitch/xkbswitch.tr
ru Russian winkeys layout
< qwertyuiop[]asdfghjkl;'zxcvbnm,.`/QWERTYUIOP{}ASDFGHJKL:"ZXCVBNM<>?~@#$^&|

йцукенгшщзхъфывапролджэячсмитьбюё.ЙЦУКЕНГШЩЗХЪФЫВАПРОЛДЖЭЯЧСМИТЬБЮ,Ё"№;:?/

de
< yz-[];'/YZ{}:"<>?~@#^&*(_\

zyßü+öä-ZYÜ*ÖÄ;:_°"§&/()?#

@lyokha
Copy link
Owner

lyokha commented Aug 16, 2015

By some reason the regexp check for empty lines in the plugin code

        if line =~ '\(^\s*#\|^\s*$\)'
            continue
        endif

is not working in your environment. I just checked it with latest vim on a Linux machine with different regexpengine set (1 and 2): all variants work. You can try to play with this value setting in your .vimrc

set regexpengine=1

(or 2), but this is global! Probably your libpcre is something strange (do you use Windows machine?).

The easiest way to fix this is just remove empty lines in your xkbswitch.tr. ))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants