preservim / vim-pencil

Rethinking Vim as a tool for writing
Other
1.57k stars 38 forks source link

markdown bullet list mangling #70

Closed sidequestboy closed 4 years ago

sidequestboy commented 6 years ago

I'm using nvim with the following minimal config with vundle to manage the plugins:

set nocompatible
filetype off

set rtp+=~/.config/nvim/bundle/Vundle.vim
call vundle#begin()

Plugin 'VundleVim/Vundle.vim'

Plugin 'https://github.com/jiangmiao/auto-pairs.git'
Plugin 'https://github.com/plasticboy/vim-markdown.git'
Plugin 'https://github.com/reedes/vim-pencil.git'

call vundle#end()
filetype plugin indent on

let g:AutoPairsMapSpace = 0

augroup pencil
  autocmd!
  autocmd FileType markdown,mkd,md call pencil#init()
  autocmd FileType text         call pencil#init()
augroup END

when using this config, in conjunction with plasticboy's vim-markdown and jiangmiao's auto-pairs, the following happens:

nvim test.md
...

then, in the file typing - [ ]<CR>[ results in:

- [ ] []

instead of

- [ ]
- []

and a lot of similar line-destroying behaviour

zeorin commented 6 years ago

Possibly related to https://github.com/reedes/vim-pencil/issues/31?

alerque commented 4 years ago

This does seem to be a duplicate of what's going on in #31. Contributions welcome, it's not immediately apparent to me how to fix it!