mattn / emmet-vim

emmet for vim: http://emmet.io/
http://mattn.github.io/emmet-vim
MIT License
6.41k stars 410 forks source link

Tab completion conflicts with emmet-vim #464

Open betoharres opened 5 years ago

betoharres commented 5 years ago

is it possible to fix this? Whe I try to create <Text></Text> tag: Tex<tab> and then <C-e>, prints <Tex></Tex> (C-e is my emmet key trigger)

Process explanation:

I also have this mapping on my vimrc:

" Tab completion
" will insert tab at beginning of line,
" will use completion if not at beginning
set wildmode=list:longest,list:full
function! InsertTabWrapper()
    let col = col('.') - 1
    if !col || getline('.')[col - 1] !~ '\k'
        return "\<Tab>"
    else
        return "\<C-p>"
    endif
endfunction
inoremap <Tab> <C-r>=InsertTabWrapper()<CR>

Any ideas? Thanks!

domi91c commented 4 years ago

I'm experiencing the same problem. I'm using coc.nvim for completion, and when I trigger emmet while selecting a completion, emmet only expands the text that I've actually typed. Is there a way I can remap the emmet trigger to select the current completion before expanding?