Skip to content

Instantly share code, notes, and snippets.

@arnaudjuracek
Last active October 5, 2019 11:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arnaudjuracek/69335be934a927bc207acc71f5842a1a to your computer and use it in GitHub Desktop.
Save arnaudjuracek/69335be934a927bc207acc71f5842a1a to your computer and use it in GitHub Desktop.

Sublime Text 3 build systems

Markdown

using vmd:

{
  "cmd": ["vmd \"$file\" --watch"],
  "shell": true,
  "selector": "text.html.markdown"
}

NodeJS w/ NVM support

using nvm:

{
  "cmd": ["source ~/.nvm/nvm.sh; if [[ -f .nvmrc && -r .nvmrc ]]; then nvm use; else nvm use default; fi; node \"$file\""],
  "path": "~/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/local/bin:/opt/local/sbin",
  "shell": true,
  "selector": "source.js",
  "target": "ansi_color_build",
  "syntax": "Packages/ANSIescape/ANSI.tmLanguage"
}

NodeJS with FNM support

using fnm

{
  "cmd": ["if [[ -f .node-version && -r .node-version ]]; then echo 'fnm: Found .node-version'; fnm use; elif [[ -f .nvmrc && -r .nvmrc ]]; then echo 'fnm: Found .nvmrc'; fnm use; fi; node \"$file\""],
  "shell": true,
  "selector": "source.js",
  "target": "ansi_color_build",
  "syntax": "Packages/ANSIescape/ANSI.tmLanguage"
}

PHP server

{
  "cmd": ["php", "-S", "localhost:8080"],
  "working_dir": "${project_path:${folder}}",
  "selector": "source.php",
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment