gcc.vim 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. " Vim compiler file
  2. " Compiler: GNU C Compiler
  3. " Previous Maintainer: Nikolai Weibull <now@bitwi.se>
  4. " Latest Revision: 2010-10-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. if exists("current_compiler")
  9. finish
  10. endif
  11. let current_compiler = "gcc"
  12. let s:cpo_save = &cpo
  13. set cpo&vim
  14. CompilerSet errorformat=
  15. \%*[^\"]\"%f\"%*\\D%l:%c:\ %m,
  16. \%*[^\"]\"%f\"%*\\D%l:\ %m,
  17. \\"%f\"%*\\D%l:%c:\ %m,
  18. \\"%f\"%*\\D%l:\ %m,
  19. \%-G%f:%l:\ %trror:\ (Each\ undeclared\ identifier\ is\ reported\ only\ once,
  20. \%-G%f:%l:\ %trror:\ for\ each\ function\ it\ appears\ in.),
  21. \%f:%l:%c:\ %trror:\ %m,
  22. \%f:%l:%c:\ %tarning:\ %m,
  23. \%f:%l:%c:\ %m,
  24. \%f:%l:\ %trror:\ %m,
  25. \%f:%l:\ %tarning:\ %m,
  26. \%f:%l:\ %m,
  27. \%f:\\(%*[^\\)]\\):\ %m,
  28. \\"%f\"\\,\ line\ %l%*\\D%c%*[^\ ]\ %m,
  29. \%D%*\\a[%*\\d]:\ Entering\ directory\ %*[`']%f',
  30. \%X%*\\a[%*\\d]:\ Leaving\ directory\ %*[`']%f',
  31. \%D%*\\a:\ Entering\ directory\ %*[`']%f',
  32. \%X%*\\a:\ Leaving\ directory\ %*[`']%f',
  33. \%DMaking\ %*\\a\ in\ %f
  34. if exists('g:compiler_gcc_ignore_unmatched_lines')
  35. CompilerSet errorformat+=%-G%.%#
  36. endif
  37. let &cpo = s:cpo_save
  38. unlet s:cpo_save