Arcanelab Blog
text

Nim Build System for Atom Step 1.

Nim Build System for Atom

Step 1. Install atom-build

Step 2. Create a file in the project directory called .atom-build.json (note the preceding period!) with the following content:

{
  "cmd": "nim",
  "args": [ "c -r --verbosity:0 ", "{FILE_ACTIVE}" ],
  "sh": true,
  "cwd": "{PROJECT_PATH}",
  "errorMatch": "^(?<file>.*\\.nim)\\((?<line>\\d+),\\s*(?<col>\\d+)\\)"
}
  • option+cmd+b will build and run the program.
  • option+cmd+g will jump to the location of the build error, if there’s any.

Step 3. Patch /Users/[username]/.atom/packages/build/lib/build.js:

- var regex = XRegExp(this.cmd.errorMatch);
+ var regex = XRegExp(this.cmd.errorMatch, 'm');