Quite often, when using
CTRL-O to jump back to an older position, vim takes me to other files I've been editing previously. Is there a command, to go back within the jumplist just in the current file?
There is command that is close to what you need:
g; will bring you back to older change position,
g, will go forward to newer change position .
List of change position can be displayed with
My EnhancedJumps plugin offers separate special mappings that restrict the jump targets to only local locations (in the same buffer) and remote locations (only in other buffers).
goes back to the previous mark (but only the previous mark) in the current buffer.