-
Notifications
You must be signed in to change notification settings - Fork 1
Tips
The examples for the usage of FUDGE import its modules with names prefixed by the florin character. This is not mandatory but just a matter of taste. Some people prefer to use a simple f, you can choose whatever you like and also use names with more characters. However, if you enjoy using ƒ, here is how you can add a keyboard shortcut in VSCode for it:
All keyboard shortcuts in VS Code can be customized via the keybindings.json file.
To configure keyboard shortcuts the way you want, hit F1 and select "Preferences: Open Keyboard Shortcuts (JSON)" This will open your keybindings.json file where you can overwrite the Default Keybindings.
// Place your key bindings in this file to overwrite the defaults
[
{
"key": "alt+f",
"command": "editor.action.insertSnippet",
"when": "editorFocus",
"args": {"snippet": "ƒ"}
}
]
It's possible to start a watch task when VSCode opens a folder. This way, you won't forget to compile. Adjust your task.json-file to the following pattern:
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"type": "typescript",
"tsconfig": "tsconfig.json",
"option": "watch",
"problemMatcher": [
"$tsc-watch"
]
},
{
"label": "auto-watch",
"type": "shell",
"command": "tsc -watch",
"runOptions": {
"runOn": "folderOpen"
}
}
]
}
In the command-palette (Strg+Shift+P oder F1) activate the option "Tasks: Allow automatic tasks in folder".
If you create a project and you want to have the latest FUDGE-modules from your local repository coming with it, you may want to link the appropriate directories to it instead of copying them. You may do so using symlinks. To create a symlink, type the following into a terminal:
mklink /J "NameOfLink" "PathToDirectory"
use the quotation marks!