I don't know what vim cannot do, so far, I feel it is so powerful!
I need indent in Normal Mode for c++ code. I found vim is using "=" to that, just visual/mouse select the code and hit "=" key, or doing "gg=G" for all.
The following style is what I need (no indentation after a keyword). It might be ugly, but let's just don't discuss that. I'm using it as an example.
template< class T > class Stack
{
public:
Stack(int = default_value);
Stack()//destructor
{delete [] values;}
bool push( T );
T pop();
bool isEmpty();
bool isFull();
private:
int size;
T *values;
int index;
};
After "=" indenting, I got the following code
template< class T > class Stack
{
public:
Stack(int = default_value);
Stack()//destructor
{delete [] values;}
bool push( T );
T pop();
bool isEmpty();
bool isFull();
private:
int size;
T *values;
int index;
};
Question: Is there a way to configure/change the indentation style/schema behind the "=" operator or Is there a mechanism to load some sort of indentation schema into the "=" in vim?
Thanks