I am looking way to make Vim save my exact cursor position when I exit it or switch between buffers.
I have the following configuration in my config:
autocmd BufReadPost * \ if line("'\"") > 0 && line ("'\"") <= line("$") | \ exe "normal g'\"" | \ endif
it only returns the cursor to the beginning of the line where my cursor was, but not the position of the cursor in it; i.e. my cursor returns to the beginning of the line, not where it was in it.
Is there any way to bring back the exact position of the cursor?
P.S. I am new in Vim