In my .vimrc file I have
autocmd BufWritePre *.c :g/./ normal gqq
with text width 119 in order to hardwrap the lines before saving the buffer.
autocmd BufWritePre *.c :g/./ normal gqq``zz
to move the cursor back to where it was and bring it in the centre but it seems like taking me to some arbitary location.
Can anyone help me with this?