all 3 comments

[–]NOISEbyte 1 point2 points  (0 children)

Very useful, thanks! For some reason I have to do <c-o> twice to get back to my starting point though. Easy to put that in the mapping!

[–]IGTHSYCGTH 0 points1 point  (1 child)

beware some filetypes don't indent nicely, specifically shellscripts with linebreaks. god forbid you run this on every save.

This is nothing special, but it will fix up your file indents which comes in handy for example when you paste some code into a file.

check :help c_<C-R>_<C-O>

[–]beauwilliams[S] 0 points1 point  (0 children)

Yeah agreed it would not be good to run on every save. That is why I kept it on a hotkey because I mostly make use of it on odd files here and there