tpope / vim-commentary

commentary.vim: comment stuff out
http://www.vim.org/scripts/script.php?script_id=3695
5.9k stars 214 forks source link

Fixed error when commentstring is not defined #81

Closed sbdchd closed 3 years ago

sbdchd commented 7 years ago

As discussed in issue #43, commentary will produce a messy error when commentstring is not defined. This fixes that issue by printing a warning message instead.

Error detected while processing function <SNR>40_go:
line    7:
E688: More targets than List items

becomes

commentary: commentstring not set
chrisbra commented 7 years ago

I would rather go with something similar to that: https://github.com/chrisbra/vim-commentary/commit/988203c955805208403ea1c0b31e9531c80f2bb1

benknoble commented 7 years ago

I'd prefer a cleaner error message overall; would like to see this merge.

idbrii commented 3 years ago

Looks like this got a different fix: 141d9d32a9fb58fe474fcc89cd7221eb2dd57b3a. Seems to do nothing on empty commentstring.