Skip to content

Syntax highlighting for files with Git merge conflict markers

Notifications You must be signed in to change notification settings

jsit/conflict-syntax.vim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

Introduction

Syntax highlighting for ft=conflict files when doing vimdiff. Adds the following highlight groups:

  • conflict: Entire area of conflict.
    • No default highlighting
  • conflictHead: Code between the <<<<<<< HEAD and ||||||| or ======= markers
    • hi link conflictHead Constant
  • conflictCommon: Code between the ||||||| and ======= markers (if using diff3)
    • hi link conflictHead Statement
  • conflictRemote: Code between the ======= and <<<<<<< markers.
    • hi link conflictHead Identifier
  • conflictMarker: The line markers themselves (<<<<<<< HEAD, =======, etc.)
    • hi link conflictHead Comment

Example:

Tips

The syntax highlighting is easier is easier to read if you do diffoff on the conflict file.

About

Syntax highlighting for files with Git merge conflict markers

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published