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

tabbing problem with cindent

Expand Messages
  • mkristofik@charter.net
    I prefer the tabbing style found at the bottom of this page: http://derkarl.org/why_to_tabs.html Now, looking at the second example, you see that the 5 and
    Message 1 of 1 , Nov 1, 2004
    • 0 Attachment
      I prefer the tabbing style found at the bottom of this page:
      http://derkarl.org/why_to_tabs.html

      Now, looking at the second example, you see that the '5' and the 'b' in "bleh"
      are lined up under the 'f' in false. Upon searching the help for a bit, I found
      that ":set cino=(0" will accomplish this. However, when those lines are
      indented with cindent on, I get something like this (I have ts=4):

      InheritingClass(false, false
      ________________5, 10, true,
      ________________bleh, blah)

      I tried it with another value in ts and got a mix of tabs and spaces (i.e., the
      usual "minimize the number of spaces by filling it up with tabs"). I'm
      wondering if there's a way to make it look like that web page, that is, tabs to
      match the level of indent for the previous line, and then spaces all the way
      out to the unmatched '(' character.

      I think maybe a clever 'indentexpr' might do it, but I'm not familiar enough
      with vim yet to give it a try.

      BTW, here are my relevant settings:
      noexapandtab
      tabstop=4
      shiftwidth=4
      nosmarttab

      Thanks in advance.

      Mike
    Your message has been successfully submitted and would be delivered to recipients shortly.