In vim, if you swap buffers with :bn and :bp, the cursor stays on the same line, but not on the same column. Is there a way to keep it on the same column as well ?
:set nostartofline
from the help: "In case of buffer changing commands the cursor is placed at the column where it was the last time the buffer was edited."
Off the top of my head I don't think so. But Vim sets the mark " as the last position when exiting a buffer. So typing `" will get you back to that spot. You could try creating an auto-command to jump to that mark automatically on entering a buffer. Try something like
:au BufEnter * :normal `"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With