Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

The first line of a script may be in format of #! interpreter, so the shell will execute the script using the specific interpreter. This is so called shebang or shbang.

Similarly, there can be some special comment like

# -*- language -*-

or

# vim: tabstop=4 :

etc. Just like shbang is used to denote which interpreter to use, these comments are used to adjust the editor's behavior.

How to call these special comments? Maybe shdash or shvim? Are there some already defined slangs for these?

And is there wiki pages to show the list of shxxx, and those softwares follow such conventions?

share|improve this question
add comment

1 Answer

up vote 8 down vote accepted

Those are called modelines, at least in vim. See :help modeline -- not exactly slang, but at least it's something to call them.

share|improve this answer
3  
They're called modelines in emacs too. There's even an emacs module to let it parse vim modelines. –  durin42 Dec 31 '10 at 5:18
    
Yeah. I've also found that, vi by default doesn't enable modelines, while vim does. –  Xiè Jìléi Dec 31 '10 at 6:53
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.