Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have the following small Specman (.e) file: (set filetype=specman)

<'
extend sys {
    a : b;
    !enable : bool;
    run() is also {
        message (LOW, "Hello World"); 
    };
};
'>

Which was nicely indented by typing with smart-indent enabled.

However, if I try to automatically indent all typed code (gg=G), I get this strange snippet:

<'
extend sys {
a : b;
    !enable : bool;
    run() is also {
        message (LOW, "Hello World"); 
    };
};
'>

I have "nolisp, nocindent, autoindent, smartindent".

Thanks, Zvika

share|improve this question

It's possible that vim is interpreting that line as a case label. Try playing around with the cinoptions according to http://vimdoc.sourceforge.net/htmldoc/indent.html#cinoptions-values.

share|improve this answer

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.