inline multiple matching within a search string in perl
I have OpenGL code for which I would like to have some special indentation
after running astyle. For example,
glBegin(GL_LINES);
glVertex2f(1.0f, 2.0f);
glVertex2f(1.0f, 2.0f);
glVertex2f(1.0f, 2.0f);
glVertex2f(1.0f, 2.0f);
glEnd();
The above code I want to change to some thing like below.
glBegin(GL_LINES);
glVertex2f(1.0f, 2.0f);
glVertex2f(1.0f, 2.0f);
glVertex2f(1.0f, 2.0f);
glVertex2f(1.0f, 2.0f);
glEnd();
In this special case whatever is there in between glBegin and glEnd I want
to shift by 4 white spaces.
I want to do this inline and using perl.
No comments:
Post a Comment