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

VIM autondent on C++ source-code

Expand Messages
  • Vishnu M Menon
    Hello, Could someone help me with the following issue, please? autoindent in Vim works great for most of the source-code. However, when I try it on the
    Message 1 of 2 , Jan 31, 2007
    • 0 Attachment
      Hello,

      Could someone help me with the following issue,
      please?

      autoindent in Vim works great for most of the
      source-code. However, when I try it on the following,
      for example,

      string
      GetHelloWorld()
      {
      return string("Hello, world!");
      }

      , the indentation becomes

      ....string
      GetHelloWorld()
      {
      ....return string("Hello, world!");
      }

      where the periods specify spaces. Notice that return
      type of the function is indented in the result, which
      is *not* what I want. The desired result is,

      string
      GetHelloWorld()
      {
      ....return string("Hello, world!");
      }

      What configuration change can fix this?

      Many thanks in advance!



      ____________________________________________________________________________________
      Finding fabulous fares is fun.
      Let Yahoo! FareChase search your favorite travel sites to find flight and hotel bargains.
      http://farechase.yahoo.com/promo-generic-14795097
    • Erlend Hamberg
      ... -- Erlend Hamberg hamberg@stud.ntnu.no
      Message 2 of 2 , Feb 1, 2007
      • 0 Attachment
        On Thursday 01 February 2007, you wrote:
        > The desired result is,
        >
        > string
        > GetHelloWorld()
        > {
        > ....return string("Hello, world!");
        > }
        >
        > What configuration change can fix this?

        :set cino+=t0

        :help 'cino'
        :help cinoptions-values


        --
        Erlend Hamberg
        hamberg@...
      Your message has been successfully submitted and would be delivered to recipients shortly.