typewriter.vim icon indicating copy to clipboard operation
typewriter.vim copied to clipboard

Add +sound check

Open jijzult opened this issue 1 year ago • 3 comments

+sound can be compiled into the source with ./configure --with-features=huge [--disable-gui].

Please add sanity check at the start:

if !has('sound') finish endif

jijzult avatar Jan 06 '24 15:01 jijzult

There is a check here inside the :TypewriterEnable command: https://github.com/AndrewRadev/typewriter.vim/blob/514eeb4df6d9ff8926dd535afa8ca3b9514f36f0/autoload/typewriter.vim#L15-L20

Adding the check in the command allows me to print an explanatory message, otherwise if you don't have +sound, the command simply won't exist and someone installing the plugin might not understand why.

Is there a scenario for you where checking for +sound doesn't kick in?

AndrewRadev avatar Jan 07 '24 07:01 AndrewRadev

noop, it gives a vim error message if not at the start.

jijzult avatar Jan 11 '24 19:01 jijzult

Could you paste the error message? The backtrace could show me where the error is coming from.

AndrewRadev avatar Jan 12 '24 07:01 AndrewRadev