6

There was already an excellent case against answers in comments made over in the Unix & Linux stack exchange meta. (Well worth reading!)

I want to discuss this here on the vi and Vim meta, because I've noticed that I see the comments-containing-answers behavior on this stack exchange more than any other that I'm active on. (Good answers, too!)

Specifically, here are four comments that were posted on questions I've asked which are actually (good!) answers:

In three of these cases I actually requested that the answer be posted as an answer, and they were. I upvoted all three and accepted two of them.


I don't know if there is perhaps some thought that there is a minimum length for an answer? That the answer is "too short" to be posted as an answer, so it should be put in the comments?

The truth is that answers are one thing and comments are a different thing (a second class citizen), and some excellent accepted answers are extremely short because the answer to the question is short. Here are a few answers that I've accepted that would have fit in comments:

3
  • 4
    No, answers should be answers. :)
    – user72
    Mar 17, 2016 at 20:21
  • 2
    @JoshPetrie, shouldn't that be posted as an answer? :D ;)
    – Wildcard
    Mar 17, 2016 at 20:59
  • 2
    I see that you saw what I did there.
    – user72
    Mar 17, 2016 at 21:11

4 Answers 4

9

In my humble opinion, short answers should not be posted as comments. An answer is an answer, even if it is short. Succinctness is desirable and should be rewarded.

1
  • 2
    I see what you did there. :)
    – Wildcard
    Apr 7, 2016 at 17:54
7

If somebody doesn't want to post an answer for whatever reason, that's fine. They're not obligated in any way to do so.

However, if their comment is an answer to the question, and they don't want to post it (or never get around to posting it) as such themselves, anybody else is free to come along and do so.

You can mark your answer "community wiki" if you feel that you'd be in some fashion "stealing" reputation from another user by doing so (but personally I never do).

3

There are two situations that I've seen that are very specific to the vi stack that may not exist other places. Both of these probably should be discussed.

An Example Plugin

There are many times when someone will ask how to perform an action, either in the form of manually typing it out, or to put into their vimrc as a simple script. A lot of times people will post comments stating that the "problem" has already been solved with a specific plugin and you should just install it.

In cases where the question has a very simple manual solution and someone posts a much more complex plugin, I think this is probably a good situation to post in the comments. If someone points to "The Kitchen Sink" plugin that does everything, its not really answering the question. However if someone posts a plugin that directly addresses the question then maybe it should be an answer. If OP ends up using that solution...isn't it the answer?

Personally I'd prefer to post the one-liners and simple functions here and then link to the project so that people can learn how to use vim, write vimscript, etc.

What you asked isn't correct, but I know what you are getting at

There are many times when someone is very new to vi/vim won't fully understand how modal editing works. They will ask a question using wrong terminology, and be mistaken in how things work in different modes. More advanced users will many times understand what OP was trying to get at even with their lack of knowledge. Hopefully someone comes in and edits the question to fix those problems, but before that happens I've seen a lot of answers in comments that start out with "What you asked isn't correct, but I know what you are getting at..." They then go on to answer the question in a comment.

I can understand that some people might feel that since they aren't answer the actual question (since the actual question is flawed) that they should post in the comments. I think this is the most annoying situation we encounter that is very specific to this stack. If you think you know what they are asking, then answer it. If you answered it incorrectly, OP has no obligation to select your answer. Use the comments to figure out what they truly are having issues with, and then go edit the question to it works.


When you go to write a question SE tells you to search for it first. If you don't know exactly what you are trying to do, you will probably have difficulties looking it up. If you do a search and all the questions come up with 0 answers, is anyone really going to open the question and dig through the comments?

I've noticed that on SE that a lot of people are afraid of giving the wrong answer. Its one thing when the topic is more theoretical but when it comes to this stack, most of the questions are "How do I turn X into Y using vim?" If your method works, but only in specific cases, post it. Someone might learn something from your example. Heck, we have vim golf, so we all know there are many ways to solve a problem with vim.

I also have noticed that on SE people tend to take small steps to a solution using comments. I don't like this approach because you end up getting a lot of "Try X, did this fix it? No, then try Y." The answers can be edited so why not give an answer and let OP submit a comment. If you came to a partial solution but in the end wasn't exactly what OP wanted, make another answer and leave the old one around for future visitors to learn.

Lastly, I was going through the unanswered questions from the past few months. Saw there were tons that had 0 answers but when I went to go answer I find that the answers are in the comments. We don't have any where near the backlog of semi-answered, but no answer selected questions as many other stacks have. But I find it odd, that with how everyone uses vim differently, we aren't seeing every question have 5 or 10 answers. I just answered one where I could have gone the function route, could have done a one-liner, could have modified default functionality or I could have used the default rc and just been more aware of all the key bindings. In the end, there were 2 solutions given, when really there could have been 4 or 5.

5
  • Your last paragraph exactly mirrors my experience and is what prompted me to write this question in the first place. :) "Oh, hey, there are a lot of unanswered questions! I can fire away at this backlog...oh, wait, they're all answered in the comments." Frustrating!
    – Wildcard
    May 5, 2016 at 22:11
  • @Wildcard part of me feels like I should just go and answer them starting with "per so and so's comment..." That way they will at least show there is an answer. Maybe OP will select and maybe they won't but at least future searches won't quit searching.
    – jecxjo
    May 5, 2016 at 22:20
  • Agreed. You can also link to a particular comment; the timestamp on each comment is a link. (It's good to include the link since usernames can be changed.)
    – Wildcard
    May 5, 2016 at 22:22
  • 2
    @Wildcard I have seen this discussion on a couple of other sites, and the general consensus seems to be: ask the commenter to post an answer, wait a reasonable amount of time, then post an answer yourself. If a commenter's solution was posted in an answer by someone else, they deserve it.
    – muru
    May 6, 2016 at 6:13
  • @muru I totally agree about credit. However I feel like this site is for the people with questions.
    – jecxjo
    May 6, 2016 at 7:11
2

As an aside, about:

I don't know if there is perhaps some thought that there is a minimum length for an answer? That the answer is "too short" to be posted as an answer, so it should be put in the comments?

There is such a condition, but only if the answer includes a link to another post. An answer that is too short and contains a link will be automatically converted to a comment on the question as it's considered too trivial. See Answer appears automatically converted as a comment.

Of course, I don't think that was the case in any of the comments you mention.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .