5

This might be a big issue that we have to resolve before getting out of private/public beta: How programming-related can questions on Vim.SE be?

For example, questions about using Vim as a programming tool are probably on-topic. How about programming in Vimscript? What about questions that require a few lines of Vimscript, but are not purely focused on the programming aspect (ex. How can I do <task that requires 5-line script>)?

What other code-related questions are on- and off-topic?

6

I would say that Vimscript is on-topic. It's a Vim feature. This site is about Vim.

Of course, the general rules of on- and off-topic apply. "plz give codez fast. kthxbye' is obviously off-topic.

Vim can also interface with Ruby, Python, Lua, and some other languages (if compiled as such). Those questions would be on-topic if it's about programming the Vim editor (ie. someone making a plugin, having a problem):

  • An on-topic example might be someone trying to make Vim do x through Python, but failing because Vim does y. This is obviously about Vim's Python interface.
  • An off-topic example might be someone with a question on how to properly use [python language feature foo]. He or she might be using the Vim Python API, but the question isn't about it, as such.
1

I'll try to express how I feel it (to hopefully open some discussion if I happen to be controversial)

Vi(m) is a text editor. Yes, it can serve as a fairly good operating system (similarly as the editor-whose-name-is-forbidden-here can), but it's not at all its purpose. So as long as the question is about writing a script that really helps in editing a file, it is IMHO ok, for instance something like (sorry it's stoopid):

Scripting Vim to convert an HTML table to the LaTeX syntax

However, some questions are about Vi(m) but certainly not about Vi(m) as an editor, for instance:

How to write a prime tester in VimScript?


As a note, I'd like to say that conceptual questions about Vim as a programming language should be fine as well, even though they don't help to edit files in Vim.

You must log in to answer this question.

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