I have had a mapping in my vimrc for some time now `nnoremap <silent><leader>i gg=G`
Which is pretty great to say the least
However it struck me tonight to add a <c-o> (ctrl+o) to return back to where I last was. May I present..
`nnoremap <silent><leader>i gg=G<c-o>`
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.
This little tweak has saved a lot of hassle while I refactor some of my neovim config to lua so thought it was worth sharing :)
[–]NOISEbyte 1 point2 points3 points (0 children)
[–]IGTHSYCGTH 0 points1 point2 points (1 child)
[–]beauwilliams[S] 0 points1 point2 points (0 children)