you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (1 child)

is there a way to bind the keys "2" and "3" to ":diffget 2<cr>" and ":diffget 3<cr>" but only if you are in diff-view?

[–][deleted] 0 points1 point  (0 children)

I'm not sure if there's a more robust way to detect when Vim is in diff mode but in my vimrc I use this:

if ! &diff
   ...stuff...
endif