When using gVim (on Windows; see below) to diff two files which both have very long paths relative to the current working directory, the dreaded "press enter" prompt appears during load, before rendering any of the useful diff information. "Very long paths" here are basically those that are long enough that both of them joined together are longer than whatever columns
is set to in my .gvimrc
.
This is extremely annoying.
How can I prevent this prompt from appearing in diff mode?
- I am aware of
shortmess
and currently have it set toasI
.t
andT
do not seem to have any appreciable effect. - I would prefer a solution that did not involve setting
cmdheight
to some arbitrary large value, because that wastes precious vertical screen space. - In my case, gVim is being invoked by an external program (Perforce), so I do not have control over the working directory I'm in before launching vim (it wouldn't matter anyhow, as one of the paths is always long and absolute); nor do I have any real control over ridiculous length of the paths.
- I do have control over the arguments passed as part of the diff operation.
A gvim invocation that reproduces the issue:
gvim -u NONE -d C:\this\folder_creates_a_very_long\path_which_reproduces_the_problem\for_people_on_stackexchange\to_look_at\a.txt C:\that\folder_creates_a_very_long\path_which_reproduces_the_problem\for_people_on_stackexchange\to_look_at\a.txt
It causes vim to print the message:
"C:\this\folder_creates_a_very_long\path_which_reproduces_the_problem\for_people_on_stackexchange\to_look_at\a.txt" 1L, 3C
"C:\this\folder_creates_a_very_long\path_which_reproduces_the_problem\for_people_on_stackexchange\to_look_at\a.txt" 1L, 3C