neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

gcc.vim (1493B)


      1 " Vim compiler file
      2 " Compiler:		GNU C Compiler
      3 " Previous Maintainer:	Nikolai Weibull <now@bitwi.se>
      4 " Last Change:		2010 Oct 14
      5 "			changed pattern for entering/leaving directories
      6 "			by Daniel Hahler, 2019 Jul 12
      7 "			added line suggested by Anton Lindqvist 2016 Mar 31
      8 "			2024 Apr 03 by The Vim Project (removed :CompilerSet definition)
      9 "			2025 Dec 17 by The Vim Project (correctly parse: 'make: *** [Makefile:2: all] Error 1')
     10 
     11 if exists("current_compiler")
     12  finish
     13 endif
     14 let current_compiler = "gcc"
     15 
     16 let s:cpo_save = &cpo
     17 set cpo&vim
     18 
     19 CompilerSet errorformat=
     20      \make:\ ***\ [%f:%l:\ %m,
     21      \%*[^\"]\"%f\"%*\\D%l:%c:\ %m,
     22      \%*[^\"]\"%f\"%*\\D%l:\ %m,
     23      \\"%f\"%*\\D%l:%c:\ %m,
     24      \\"%f\"%*\\D%l:\ %m,
     25      \%-G%f:%l:\ %trror:\ (Each\ undeclared\ identifier\ is\ reported\ only\ once,
     26      \%-G%f:%l:\ %trror:\ for\ each\ function\ it\ appears\ in.),
     27      \%f:%l:%c:\ %trror:\ %m,
     28      \%f:%l:%c:\ %tarning:\ %m,
     29      \%f:%l:%c:\ %m,
     30      \%f:%l:\ %trror:\ %m,
     31      \%f:%l:\ %tarning:\ %m,
     32      \%f:%l:\ %m,
     33      \%f:\\(%*[^\\)]\\):\ %m,
     34      \\"%f\"\\,\ line\ %l%*\\D%c%*[^\ ]\ %m,
     35      \%D%*\\a[%*\\d]:\ Entering\ directory\ %*[`']%f',
     36      \%X%*\\a[%*\\d]:\ Leaving\ directory\ %*[`']%f',
     37      \%D%*\\a:\ Entering\ directory\ %*[`']%f',
     38      \%X%*\\a:\ Leaving\ directory\ %*[`']%f',
     39      \%DMaking\ %*\\a\ in\ %f
     40 
     41 if exists('g:compiler_gcc_ignore_unmatched_lines')
     42  CompilerSet errorformat+=%-G%.%#
     43 endif
     44 
     45 let &cpo = s:cpo_save
     46 unlet s:cpo_save