neovim
neovim copied to clipboard
'keywordprg': pass count as first argument if command doesn't support a range
Feature already in Vim?
Yes, Vim 7.4.1833
Feature description
Vim, despite having the same documentation for 'keywordprg'
, actually implements using an Ex command as 'keywordprg'
differently (see https://github.com/vim/vim/issues/10745). Vim passes count as the first argument if it is used, and some Vim plugins (including some runtime plugins shipped with Nvim) assume this behavior even though this is not documented behavior. Since using a range with a command that doesn't support a range is an error anyway, it may be better to pass the count as first argument in this case for compatibility with Vim.
I am going to try to tackle this one since it seems like a small beginner issue, if that's alright.
Do you have an example of one of the runtime plugins that uses the undocumented vim behavior?
https://github.com/neovim/neovim/blob/master/runtime/ftplugin/systemd.vim
I do want to try and do this, but unsure of the time it will take me (not really a C programmer), so someone else can feel free to do it if there isn't a PR up for this soon.