mirror of
https://github.com/preservim/vim-pencil.git
synced 2025-11-15 05:13:47 -05:00
and removed the 'w' option, as it causes more problems than it fixes
This commit is contained in:
@@ -49,8 +49,8 @@ function! pencil#setAutoFormat(mode)
|
|||||||
let b:last_autoformat = a:mode == -1 ? !b:last_autoformat : a:mode
|
let b:last_autoformat = a:mode == -1 ? !b:last_autoformat : a:mode
|
||||||
if b:last_autoformat
|
if b:last_autoformat
|
||||||
augroup pencil_autoformat
|
augroup pencil_autoformat
|
||||||
autocmd InsertEnter <buffer> set formatoptions+=aw
|
autocmd InsertEnter <buffer> set formatoptions+=a
|
||||||
autocmd InsertLeave <buffer> set formatoptions-=aw
|
autocmd InsertLeave <buffer> set formatoptions-=a
|
||||||
augroup END
|
augroup END
|
||||||
else
|
else
|
||||||
silent! autocmd! pencil_autoformat * <buffer>
|
silent! autocmd! pencil_autoformat * <buffer>
|
||||||
|
|||||||
Reference in New Issue
Block a user