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

cinoptions limitations

Expand Messages
  • Carsten Mattner
    Having searched the lists and web I couldn t find an answer. Relevant configuration: set smartindent set autoindent set cinoptions=:0,W4,l1,i0,g0,(0,t0 I fail
    Message 1 of 2 , Mar 3, 2012
      Having searched the lists and web I couldn't find an answer.

      Relevant configuration:
      set smartindent
      set autoindent
      set cinoptions=:0,W4,l1,i0,g0,(0,t0

      I fail to configure cinoptions to not mis-indent two pieces
      of C++ code. C++ problem only, C indents correctly with
      the above cinoptions.

      C++ template (typename)

      wrong:
      template <typename T>
      class AClass {
      private:
      public:
      };

      right:
      template <typename T>
      class AClass {
      private:
      public:
      };


      C++ constructor initializer list

      wrong:
      AClass(int foo) {
      :flag(false)
      { do_stuff(); }

      right:
      AClass(int foo) {
      :flag(false)
      { do_stuff(); }

      --
      You received this message from the "vim_use" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php
    Your message has been successfully submitted and would be delivered to recipients shortly.