Skip to content
Advertisement

How to format 2nd and 3rd lines on the first line?

I am using VIM, and I want to format 2nd and 3rd lines. I can do it by :2,3left<number of spaces>

 * @brief:     Hello world
 * Hello world hello world
 * Hello world hello world

How to do it easier to get something like this?

 * @brief:     Hello world
 *             Hello world hello world
 *             Hello world hello world

Advertisement

Answer

try this pres Esc+: then press v then press enter , select the second and third lines , press = https://www.cs.swarthmore.edu/help/vim/reformatting.html

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement