When I execute a function in vim, it puts my cursor back on the line at column 1. Is there a way to get back to where my cursor previously was on that line, i.e., the exact column number?
I thought perhaps doing:
Would get me back to the exact cursor position, but that seems to take me to the line before (and not the position of the existing line before it was moved). Is this possible to do? Here would be an example of what I was trying also from within the function:
func MyFunction() call cursor(line('.'), col('.')) endfunc