1
I'm trying to disable the feature in vim that remembers where I was, when I'm using vimdiff. the reason for this is simple I don't want to miss a change that has scrolled out of view.
I found a lot of documentation on mkview and loadview but nothing on how to disable them. does anyone know how to disable loadview.
one interesting part of this is that because the file it's being compared to may have extra code at the start it needs to match the starting position of whichever file is longer.
I've gotten half of the problem solved thanks to garyjohn.
if &diff
au BuffWinEnter * 1
endif
the remaining problem is when the file I"m comparing it to is taller so scrolling to the first line of my changed file does not display all the changes in the old file.
in concept what I need to do is
1.) detect if vim is in diff mode
2.) scroll to the first line of the new file
3.) switch panes to the old code
4.) scroll to the top of hte changed file
5.) switch back to the new file
thanks for the insight, sadly the code example with the if line threw errors on loading up vim, and I didn't notice the second code snipped did anything. – Fire Crow – 2012-05-18T17:29:50.293
I did get something to work see updated post – Fire Crow – 2012-05-18T17:46:28.230