vim-xkbswitch icon indicating copy to clipboard operation
vim-xkbswitch copied to clipboard

Error detected while processing function <SNR>180_tr_load:

Open coresh opened this issue 8 years ago • 3 comments

vim running and :messages output :

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

coresh avatar Aug 16 '15 09:08 coresh

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

lyokha avatar Aug 16 '15 11:08 lyokha

/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Ü*ÖÄ;:_°"§&/()?#

coresh avatar Aug 16 '15 13:08 coresh

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. ))

lyokha avatar Aug 16 '15 13:08 lyokha