need examples for %s in errorformat of vim

432 Views Asked by At

this looks like simple question, anyone know what does the %s mean for errorformat option in VIM? The help text in vim is not clear to me, I need an example to understand it.

1

There are 1 best solutions below

2
On BEST ANSWER

%s is for cases where:

  • there is no line number in the compiler output (so %l can't be used),
  • the exact content of the line is available in the compiler output.

For example, the following compiler output:

foo/bar.xml:     <foo bar="baz">hamburger</foo>

could be consumed with the following &errorformat:

set errorformat=%f:%\\s%s