Closed NMme closed 2 years ago
I ran into the same issue on Debian stable. Also the nvim variant in vimwiki.vim didn't work here. Above PR fixes the issue.
Hi, conditioning the version is a good start, but copy-pasting the nvim make_random_chars() into it causes many errors as luaeval() etc. is not compatible with normal vim. So this code still produces errors for normal vim-version (<802). I think there needs to be a completely new function only utilizing alternative possibilites to create random chars, e.g. this example.
Further I found there is a disclaimer in the docu already, noting that make_random_char() requires vim version 8.1.2342 However whenever vimwiki.vim is called (e.g normal zettel-creation) without even using this mode the function still gets defined and generates a lot of error prompts. Maybe the whole make_random_char() functionality should just be made dependable on the version to not confuse users with these error prompts.
The new PR doesn't depend on luaeval anymore, you're welcome to test.
Nice solution to the problem, working as it should. Thank you!
@michal-h21 What do you think about it?
Hi,
I am using the current version of Vim from the official Ubuntu 20.04 distribution package which currently is Vim-Version 8.1.2269
However I got issues using the vim-zettel plugin as the function _zettel#vim-wiki#make_randomchars require the function srand() and rand() which are only supported starting from Vim Version 8.1.2342.
Error message (for documentation):
Maybe it would be helpful to make the plugin more accessible to new users by finding a work-around or note the required vim-version in the README until a newer vim-version is added to the Ubuntu distribution packages.
Best Regards