tweekmonster / deoplete-clang2

MIT License
90 stars 17 forks source link

issue with this plugin and neosnippet #12

Open wsdjeg opened 7 years ago

wsdjeg commented 7 years ago

mini vimrc

set rtp+=~/.cache/vimfiles/repos/github.com/Shougo/neosnippet.vim
set rtp+=~/.cache/vimfiles/repos/github.com/Shougo/neosnippet-snippets
set rtp+=~/.cache/vimfiles/repos/github.com/Shougo/deoplete.nvim
set rtp+=~/.cache/vimfiles/repos/github.com/tweekmonster/deoplete-clang2
let g:deoplete#enable_at_startup = get(g:, 'deoplete#enable_at_startup', 1)

imap <expr><Tab>
            \ neosnippet#expandable_or_jumpable() ?
            \ "\<Plug>(neosnippet_expand_or_jump)" : "\<Tab>"

reproduce step:

  1. open vim via vim -u test.vim
  2. :e test.c
  3. type i to insert mode, then type into main<tab>

you will see

main<Plug>(neosnippet_expand_or_jump)

but I think it should be

int main(int argc, char const* argv[])
{

    return 0;
}

ref : https://github.com/SpaceVim/SpaceVim/issues/356

Shougo commented 7 years ago

deoplete-clang2 overwrites <Tab> mapping. It seems the mapping conflict.