1

When viewing a merge candidate created by git you will have something like

. . .
Some stuff not in conflict
<<<<<< HEAD  
Some stuff  
======
Something different
>>>>>> devel
Some more stuff not in conflict
<<<<<< HEAD
. . .

For me at least, Vim tries to fold out the conflict so it looks like

. . .
Some stuff not in conflict
[fold here][<<<<<< HEAD]
Some more stuff not in conflict
[another fold][<<<<<< HEAD]
. . .

I don't really care about the stuff not in conflict. I'm looking at the file because I want to resolve the conflict which means I need to look at it. Instead Some stuff not in conflict and Some more stuff not in conflict should be folded out so I can focus on the conflicts. In other words, I want the exact opposite. Preferably, I'd like some context, but I'll take what I can get.

How do I do that?

More info:

:verbose set foldmethod? foldexpr? syntax? filetype?
foldmethod=manual
        Last set from /usr/share/vim/vimfiles/plugin/SyntaxFolds.vim line 134
  foldexpr=0
  syntax=tex
        Last set from /usr/share/vim/vim81/syntax/syntax.vim line 32
  filetype=tex
        Last set from /usr/share/vim/vim81/autoload/dist/ft.vim line 695
  • I'm sorry, but that command returns an error for me. Both as a whole and individually. I also tried without verbose. I have no clue why that isn't working. – Nero gris May 3 at 1:53
  • Thanks. I edited the question. – Nero gris May 3 at 2:00
  • Have you tried editing SyntaxFolds.vim to disable the match for the stuff in conflict and a new expression for the stuff not in conflict? – Steve May 3 at 2:46
  • @Steve I have not, but I will this evening. Thanks. – Nero gris May 3 at 11:58
  • @Steve Looking into your suggestion, I'm not sure where to start. – Nero gris May 4 at 21:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.