Is there a way I can modify tasks.json and keybingings to create shortcuts for compiling the code and running it? After a ton of googling I came up with this. When I press ctrl+shift+b it compiles but command prompt with the program doesn't pop up.
"version": "0.1.0",
"isShellCommand": true,
"showOutput": "always",
"command": "cmd",
"args": ["/C"],
"tasks": [
{
"taskName": "Compile",
"suppressTaskName": true,
"isBuildCommand": true,
"args": ["\"fpc ${file}\""]
},
{
"taskName": "Run",
"suppressTaskName": true,
"isBuildCommand": true,
"args": ["\"start $[fileBasenameNoExtension}.exe\""]
}
]
}
Pascal is stil alive and kicking. What I meant by Pascal is the modern object Pascal programming, not your daddy's Pascal. I've been making many apps for all platforms using (mainly) Free Pascal, with Lazarus IDE (for GUI apps) and VS Code (for non-GUI apps). Modern Pascal can do whatever every other languages out there are able to do. Check out The Big 5 Pascal of Today.
Now… to be able to work use Pascal with VS Code. First, install Free Pascal for sure. Then install the OmniPascal extension. And read my guide Free Pascal and VS Code. I provide many useful tasks in there to help you work with Pascal, including code formatting. It's in Indonesian but you could use Google Translate to read it in English (or whatever language you like).
HTH.
this is my tasks.json and it works very well
{
"version": "2.0.0",
"tasks": [
{
"type": "shell",
"label": "PAS build active file",
"command": "fpc",
"args": [
"${file}"
],
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": []
}
]
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With