Sunday, December 22, 2013

Whitesmiths like C++ indentation

Hi

I'm pretty new to vim and currently in the process of setting it up as my C++ editor. I really like the fast editing you get from the shortcuts, even though I'm currently a bit overwhelmed by the sheer amount of them :). I've managed to get autocompletion working using clang_complete, awesome plugin, and I'm trying to get the formatting/indentation to work.

The only issue with the indention i currently have is the following. I'd like vom to indent the following code in this way:

namespace foo
{
template<typename T> class foobar : public baz
{
public:
void bar();
};
};

(note that the block of the class is indented one level) but all I get is the following:

namespace foo
{
template<typename T> class foobar : public baz
{
public:
void bar();
};
};

where the class block is not indented. It does in fact indent correctly if the class does not inherit from another class.

My current cino string is as follows: f1s,{1s,}0,l1,b,b0,h1s,i1s,t0,>1s,:1s,(1s

Is this a known issue, or am I missing something? And yes, I know that this way of indentation might seem a little crazy, but i like it :).

Thanks in advance,

Felix

--
--
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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment