alvan/vim-closetag

Autoformat tags on "Enter"

Opened this issue · 3 comments

Hey. Can you please implement behaviour on pressing enter like on gif?

Thanks

Peek 2020-09-10 15-06

MoxHe commented

I find a way to work around with it if you are using coc for autocompletion.
Put this in your vimrc:
inoremap <silent><expr> <cr> pumvisible() ? coc#_select_confirm() : "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"

I find a way to work around with it if you are using coc for autocompletion.
Put this in your vimrc:
inoremap <silent><expr> <cr> pumvisible() ? coc#_select_confirm() : "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"

Unfortunately I'm not using coc now.

Hey. Can you please implement behaviour on pressing enter like on gif?

Thanks

Peek 2020-09-10 15-06

For people who will face this issue like me in the future.
I got the desired behavior with these plugins (in Neovim)

Plug 'windwp/nvim-ts-autotag'
Plug 'windwp/nvim-autopairs'