SlickEdit Community
SlickEdit Product Discussion => SlickEdit® => Topic started by: studentpower on February 22, 2010, 08:01:06 AM
-
for several lines? For example, if I have:
for (...)
{
...;
}
I want to change it to:
#ifdef ...
for (...)
{
...;
}
#endif
Instead of using beautify, any other easier way to do this?
-
Assuming you are doing C/C++, I would say using the existing "Surround With" alias would be the easiest way. Just select the lines you want to surround with the #ifdef, right-click, select "Surround Selection With...", and choose "#ifdef".
In general, in Vim if you want to indent a certain number of lines you can just use the ">" command. Start a line selection with "Shift+V", use "j" or "k" to cursor up or down and select all the lines, then hit ">" as many times as desired. "<" will move the lines the other way.
Hope this helps.
- Ryan