Question

Is there a way to simply have my blocks and their closing end keyword align properly with vim? If I have a function which is nested with several conditions, things can start to get ugly fast. Can vim save the day?

Was it helpful?

Solution

Sure. Just select the relevant block of code and press =.

OTHER TIPS

There's also a nice Vim plugin called endwise that automatically inserts the ends for you.

gg=G

(go to top, re-indent all the way down to the bottom)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top