vim-pencil icon indicating copy to clipboard operation
vim-pencil copied to clipboard

"Undefined variable" and "Invalid arguments" errors

Open ghost opened this issue 3 years ago • 2 comments

I saw one previous bug that was related, https://github.com/preservim/vim-pencil/issues/4, which was fixed.

I don't normally use vim/nvim so I hadn't noticed this before, but if I run nvim file.txt or nvim file.md I get the following errors. If I just create a new empty buffer there are no errors.

It's possible this is user error, and if it is please close, but if you have any guidance it would be appreciated.

NVIM: v0.6.0 Commit: HEAD @ 942e02e53cc2d914f215a2c69707fbdbdd137f86

Config

let g:pencil#wrapModeDefault = 'soft'   " default is 'hard'

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

Error:

Error detected while processing function pencil#init:
line   43:
E121: Undefined variable: g:pencil#autoformat
E116: Invalid arguments for function get
E116: Invalid arguments for function pencil#setAutoFormat

ghost avatar Jan 25 '22 01:01 ghost

Which method did you use to install the plugin?

alerque avatar Jan 25 '22 13:01 alerque

Vundle

anmull avatar Jan 29 '22 16:01 anmull