Non-english completions
naquad opened this issue · 19 comments
Completion works fine with English characters, but it doesn't trigger with Russian while manual invocation of completion (<c-x><c-n>
) works fine.
It is feature. You want to complete non English characters, you must change g:neocomplcache#keyword_patterns
variable.
As I understand variable is g:neocomplcache_keyword_patterns['_']
.
I've set it to [\kА-Яа-я]\+
(which works: :echo match('тест', '[\kА-Яа-я]\+')
) that didn't help :(
Any clues?
UPD: file was text (test.txt)
If you want to edit text filetype, you must change g:neocomplcache_keyword_patterns['text']
.
that didn't help either :(
let g:neocomplcache_keyword_patterns['text']= '[\kа-яА-Я]\+'
- not working
I think you must regenerate cache by :NeoComplCacheClean
.
Didn't help.
It is same behavior on neocomplete?
I don't want to change neocomplcache. But if neocomplete, I will check it.
I don't have neocomplete and can't check it.
Oh, I get it.
I think it is feature. Because, neocomplete or neocomplcache ignore multibyte input.
It is neocomplete function. But neocomplcache is same.
function! neocomplete#is_multibyte_input(cur_text) "{{{
return (exists('b:skk_on') && b:skk_on)
\ || char2nr(split(a:cur_text, '\zs')[-1]) > 0x80
endfunction"}}}
You cannot complete full multibyte input candidates like тест
.
Erm so basically it can't be fixed because you call that bug a feature? 0o
It is not bug. It is intended feature. Because, current GVim IM integration is buggy.
Auto completion should not work on IM input. So, neocomplete/neocomplcache ignores multibyte input.
Could you please add some option to turn this off? like g:neocomplcache_force_multibite
or something
I don't want to change neocomplcache code. Pull request is wellcome.
I think the name should beg:neocomplcache_enable_multibyte_completion
.
https://github.com/naquad/neocomplcache.vim/commit/77d518050489e04a4197faf75f74405b8123b200
I've called it g:neocomplcache_allow_multibyte
, but that can be changed. In any case that causes some unclear issue I can't figure out: completion looses last byte, i.e. was тест
and suggestion is тес
. Trying to figure it out.
Well, neocomplcache has multibyte input bugs. Can you check it?