preservim / vim-pencil

Rethinking Vim as a tool for writing

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

markdown bullet list mangling

sidequestboy opened this issue · comments

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

Possibly related to #31?

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!