Sublime Forum

Build Find Next Error (F4) Doesn't Work?

#1

I’ve been banging my head against the wall this entire morning trying to figure out how to get file_regex to move to the next/previous error. I’ve tried almost every regex I found online but no dice.

I build from a batch file in Windows, here’s a more detailed question I asked on SO http://stackoverflow.com/questions/37379222/sublime-text-3-next-error-f4-doesnt-work

I press F4 and it doesn’t take me to the next error.

The build output in Sublime console looks like:

SDLEngine.cpp
…\Source\SDLEngine.cpp(175): error C2065: ‘s’: undeclared identifier
…\Source\SDLEngine.cpp(175): error C2146: syntax error: missing ‘;’ before identifier ‘Width’
[Finished in 0.2s]

What am I missing?

0 Likes

#2

What’s your build system look like?

0 Likes

#3

I mentioned it in the SO link, it’s pretty much just the cmd command and a file_regex.

After many tries, here’s what I have:

{
“shell_cmd”: “W:/Projects/Breakout/src/SDLEngine/Build.bat”,
“working_dir”: “W:/Projects/Breakout/src/SDLEngine/Source”,
“file_regex”: “^\s*\.\(.)\(.”,
“line_regex”: “^.\(([0-9])\)”,
}

Which does jump to the error in the output console but not to the actual error line in the file. i.e. if I was editing FileA and the error was in FileB, I hit F4 and it doesn’t take me to FileB. (I tried it with and without the project_dir)

Any ideas?

0 Likes

#4

In the console type:
sublime.log_result_regex(True)
To activate debug log, after running the build command you must have some lines beginning with:
found result file, line, col of
in the console.
Check or post them.

I think you have to use something like:
"file_regex"::"^\s*(.+)\((\d+)\)():\s*(.+)"
and remove “line_regex” from your build (doc).

Good luck.

1 Like