Skip to content

Instantly share code, notes, and snippets.

@mathiasmag
Created February 23, 2018 20: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 mathiasmag/76e431301afa297fd8a294613f881d42 to your computer and use it in GitHub Desktop.
Save mathiasmag/76e431301afa297fd8a294613f881d42 to your computer and use it in GitHub Desktop.
VisualCode defined default build task for PL/SQL.
//Modified to fit the more recent version of VisualCode versions structure for the tasks.json
// Origin: https://ora-00001.blogspot.se/2017/03/using-vs-code-for-plsql-development.html
// https://gist.github.com/mortenbra/9d7bd2147b02ae8fa2e14dbc38935e5e#file-vscode_tasks-json
{
"version": "2.0.0",
// The command is a shell script
"type": "shell",
"group": {
"kind": "build",
"isDefault": true
},
// Run sqlplus via a batch file
"windows": {
"command": "_run_sqlcl.bat"
},
"osx": {
"command": "./_run_sqlcl.sh"
},
"linux": {
"command": "./_run_sqlcl.sh"
},
// first argument is the database connection string
// second argument is the file to execute (ie the current file)
"args": ["user/password@//localhost:1521/database", "@\"${file}\""],
// do not switch to the output pane automatically
//"showOutput": "silent",
"presentation" : { "reveal": "silent" },
// use this to get any database errors (from user_errors view) listed in the "Problems" pane in VS Code
"problemMatcher": {
"owner": "plsql",
"fileLocation": ["relative", "${fileDirname}"],
"pattern": [
{
"regexp": "(.*) (\\d*)\/(\\d*) (.*?) (.*)",
"severity": 1,
"line": 2,
"column": 3,
"file": 4,
"message": 5,
"loop": true
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment