3

Currently, Folding fails: vim can't find any fold is tagged with  .

Should we have specific tags for questions about editing source code in a particular programming language?

Please vote for one of the proposals below or add a counterproposal of your own.

| |
5

Yes, but only if the question is specific to a specific filetype, or occurs only with a specific filetype.

Vim ships with a number of support files for many different formats (not just programming languages), for PHP:

$ find /usr/share/vim -name php\*
/usr/share/vim/vim74/autoload/phpcomplete.vim
/usr/share/vim/vim74/indent/php.vim
/usr/share/vim/vim74/ftplugin/php.vim
/usr/share/vim/vim74/syntax/php.vim
/usr/share/vim/vim74/compiler/php.vim

In your example, the question was specifically about a problem that is specific to the PHP filetype, so the tag is useful. People experienced with using Vim to edit PHP could follow this tag, and answer questions about it.

An example where the tag would not be useful might be a question such as How to comment out a set of lines which are selected in visual mode? or Using % in languages without curly braces where a code example is provided in PHP. This question is not about the PHP filetype as such.

As for the tagging, we could use prefix them with filetype-; eg. ; this would clarify that the question is about the python filetype. There are also filetypes about other things that might cause confusion, such as and or and .

I think using instead of just would also be a good idea, as this makes it clearer what the tag is about, and would probably reduce the number of questions that should have been tagged with but are tagged with instead.

| |
2

Yes, such tags help organize the site. It recognizes that there are concerns that are specific to each programming language. As another example, How do I move vertically until reaching a non-whitespace character? addresses a concern when working with Ruby code.

However, it would be better to use a naming convention like . Otherwise, it would be unclear whether a [python] tag refers to a question about scripting Vim using Python () or editing Python source code.

  • No, I don't quite agree. There's zillions of 2D languages, why would this particular question need a tag of any single of them? – yo' Feb 6 '15 at 22:36
-1

No, a generic tag suffices. Tags about the content of the source code being edited would be too troublesome. For example, for the purposes of configuring folding, PHP isn't that different from C or Java. So why limit the question by putting a [PHP] tag on it?

Trying to categorize all of the programming languages into a few language families that everyone can agree on is a hopeless task, so it's better to just rely on title and body text searches.

You must log in to answer this question.

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