mhinz / neovim-remote

:ok_hand: Support for --remote and friends.
MIT License
1.73k stars 83 forks source link

Raise errors for confusingly close & wrong patterns in args #161

Open poetaman opened 3 years ago

poetaman commented 3 years ago

nvr --remotesend ":bd<cr>" opens a file named ":bd<cr>", and nvr --remote-send ":bd<cr>" deletes buffer in the focussed window.

The former was a typo that I made few couple of times already, while actually wanting to do the latter. And the difference between them is an inconspicuous hyphen. It clutters the session with more buffers, would be better to rather raise an error.

Another example:

nvr --weird "weird.txt" creates two buffers for two new files --weird and weird.txt without raising any error that weird is not a legit option.