tyru / caw.vim

Vim comment plugin: supported operator/non-operator mappings, repeatable by dot-command, 300+ filetypes
379 stars 48 forks source link

Doesn't comment current line when lazy loading it and set remembering last cursor location #154

Open yan42685 opened 3 years ago

yan42685 commented 3 years ago

wrong-comment-location

minimal init.vim

call plug#begin('~/.vim/plugged')
Plug 'tyru/caw.vim', {'on': ['<Plug>(caw:hatpos:toggle)']}
imap <c-_> <esc><Plug>(caw:hatpos:toggle)
nmap <c-_> <Plug>(caw:hatpos:toggle)
vmap <c-_> <Plug>(caw:hatpos:toggle)
call plug#end()
autocmd BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exec "normal! g'\" \| zz" | endif