Closed bwildenhain closed 3 years ago
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.
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 didn't simply copy-paste the nvim-code, but adapted it slightly, so it works in vim compiled with lua-support without any errors (packages vim-nox or vim-gtk3 in Debian), but of course, it would be better to have code which is compatible with lua-less vim.
I see, thank you for clarifying!
I created PR #84 without depending on lua.
Adapted vimwiki.vim to work without srand (i.e. version prior to 8.1.2342).
Fixes #81