For those who are unfamiliar with it, the Code Review Stack Exchange site deals with reviewing working code for feedback on

  • Best practices and design pattern usage
  • Security issues
  • Performance
  • Correctness in unanticipated cases

It even has a few vimscript questions. Note that code review answers shouldn't be just blocks of code that improve upon the code in question, but should explain how the code can be improved.

Now, to the point of my question. I've been thinking of splitting of parts of my vim configuration into plugins, both for modularity and so that others can use it more easily. Even though I have a lot of rep on this site, I'm nowhere near a Vim expert. A lot of my config (what little there is) might be (and probably is) terrible in the following respects:

  1. readability (and consequently, maintainability)
  2. efficiency or performance
  3. correctness (for security and corner cases)

It might look like this, without being as good:

enter image description here

So, I would like to post code (either in self-contained parts, or the whole script) for review here.

How do you feel about this? Will it fit here? Should I stick to Code Review instead?

Related, but orthogonal is Are vimgolf questions on-topic?

Shorter code is not necessarily better code.


This is strictly for working code, distinguishing it from debugging problems. The posted code should reasonably work as intended to the best of my knowledge, however, what might be a common case for you could have escaped my notice.


Lots of SE sites have overlapping scope. Questions about vimscript could fall under either site. I think layout of plugins would fall more heavily here.

Any post gives a learning opportunity to the community that sees the question and answers. I frequent this site a lot more than codereview, so I'd learn more from such posts here than there.

The only reason against it is that I doubt we'd want to become primarily a vimscript review site, but I doubt that would happen.

I say go for it!

  • 1
    While I totally agree with you about the fact that code review would be a great way to learn, I have a little objection about the second part of the question: I'm not sure that Vimgolf question would be really on topic on here since by definition there's not a definitive good answer to them. Even though some SE site have an overlapping score I think Vimgolf shoud remain on code golf because they don't really reflect a "normal" use of Vim. – statox Apr 5 '16 at 11:30
  • 1
    @statox I'm not making a case for vim-golf. Just the opposite: code review should not be taken as an excuse for posting unreadable but shorter code. People have a tendency to think that shorter code is "better", so I forestalled that. – muru Apr 5 '16 at 17:45
  • @muru I'm sorry I misinterpreted what you said, I thought you was asking the question again that's why I made this comment. Thank you for clarify this: we agree that shorter isn't necessarily better. So yeah definitely let's begin to post code review questions! – statox Apr 5 '16 at 18:06

I know there exist a SE site dedicated to code review. I've seen a few questions over there. But honestly, I'd rather see vimscripting code review questions either here or even on SO. The reason being that I'm already following too many forums dedicated to vim. I'd rather not spend time on another one.

There are issues upon which nobody will ever agree, for instance: "shall we duplicate code among plugins, or shall we rely on library plugins?", but for pure scripting, we should be able to easily agree on what to say.

You must log in to answer this question.

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