Skip to content

Instantly share code, notes, and snippets.

@andlrc
Created March 11, 2025 21:52
Show Gist options
  • Select an option

  • Save andlrc/82687805b1bbea39fda2fc49c6a92fc3 to your computer and use it in GitHub Desktop.

Select an option

Save andlrc/82687805b1bbea39fda2fc49c6a92fc3 to your computer and use it in GitHub Desktop.
" Vim syntax file
" Language: Quickfix window
" Maintainer: Andreas Louv <[email protected]>
" Last Change: Feb 24, 2012
" Quit when a syntax file was already loaded
if exists("b:current_syntax")
finish
endif
" Hide start of file path
syn match Conceal "^\%(.\{-}/\%([^/]\+|\d\)\@=\)\="
\ conceal
\ nextgroup=qfFileName
" A bunch of useful C keywords
syn match qfFileName "[^/|]*|\@1=" nextgroup=qfSeparator contained
syn match qfSeparator '|' nextgroup=qfPosition contained
syn match qfPosition '\s*\d\+\(\s*col\s*\d\+\)\=\s*' contained nextgroup=qfSeparator contains=qfError
syn match qfError "error" contained
" The default highlighting.
hi def link qfFileName Directory
hi def link qfPosition LineNr
hi def link qfSeparator LineNr
hi def link qfError Error
let b:current_syntax = "qf"
" vim: ts=8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment