Loading ...
Sorry, an error occurred while loading the content.

RE: Indentation of comments

Expand Messages
  • Carter N.
    Hi all, A while back, I wrote that my indent script for Pascal files didn t indent the middle of three part comments properly. (* * Pascal comment Resulted in
    Message 1 of 3 , Nov 23, 2004
    • 0 Attachment
      Hi all,

      A while back, I wrote that my indent script for Pascal files didn't indent
      the middle of three part comments properly.

      (*
      * Pascal comment

      Resulted in

      (*
      * Pascal comment

      This was because my indent script was overriding Vim's built-in indentation
      behaviour. I had 'comments' and 'formatoptions' set correctly. I've now
      fixed this by returning the indent value already calculated by Vim for the
      line. However, this doesn't work for bulleted lists. In this case, it
      indents thus:

      (*
      * Pascal comment
      *
      * - This is a bulleted comment, where comment
      * leaders are not indented properly.

      I can adjust the indentation of the "*" leader easily, but how do I also
      indent the actual comment text relative to the leader?

      Neil
      --------------------------------------------
      Neil Carter Psychology Department
      IT Technician University of Wales Swansea
      Wales, United Kingdom

      http://psy.swansea.ac.uk/staff/Carter/
    Your message has been successfully submitted and would be delivered to recipients shortly.