preservim / vim-pencil

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

Suspending autoformatting doesn't work? #88

Open jgonera opened 4 years ago

jgonera commented 4 years ago

Thank you for an excellent plugin! Makes writing Markdown much easier. The only time I'd like to disable it is when editing lists so I added let g:pencil#map#suspend_af = 'K' to my config. However, hitting K+i/o/a seems to have the same effect as hitting only i/o/a (autoformatting enabled).

My config looks like this:

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

let g:pencil#map#suspend_af = 'K'

Using Neovim 0.4.3.

Am I doing something wrong?

jgonera commented 3 years ago

Has anyone been able to get this to work and could share their config?

matkozak commented 3 years ago

Does not work for me either. Also Neovim.

However, making a shortcut for the PencilToggle command (to Ctrl+P with nmap <c-p> :PencilToggle<CR> for example) is a low-effort solution that achieves more or less the same thing for me.

janderland commented 6 days ago

This function doesn't work for me either in Neovim 0.10.1.