fgrsnau / ncm2-aspell

ncm2 source that completes words from aspell dictionary
3 stars 0 forks source link

Is there a way to activate it on a per buffer basis? #1

Open Millani opened 5 years ago

Millani commented 5 years ago

I wonder if there is an easy way to activate ncm2-aspell on a per buffer basis just like https://github.com/filipekiss/ncm2-look.vim

It would be useful to have it work only in Markdown and TeX files, for example, since it becomes disruptive if used while coding.

fgrsnau commented 5 years ago

I don't know if you are aware of this (there is no documentation), but the ncm2-aspell plugin gets only activated when spell is set.

If you change the setting :set nospell then you can trigger reinitializing the plugin with :doautocmd BufRead. Usually, I do not have spell enabled in code files, but use it for emails and the like.

Adding a buffer local variable (tristate: force on, force off, auto) could be implemented in the same fashion.