Open trymeouteh opened 2 weeks ago
This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.
Happy Coding!
This is in fact surprisingly difficult to do yourself.
{
"filewatcher.commands": [
{
"match": "\\.ts*",
"isAsync": true,
"cmd": "echo '${file} file content Changed'",
"event": "onFileChange"
}
]
}
fswatch
can't be used with file extension filtering, You'll need to use a platform specific tool, such as inotifywait. However, these tend to be more bare bones, requiring you to do more work. Here's a solution by Denilson Sá Maia on the Super User StackExchange
inotifywait -e close_write,moved_to,create -m . |
while read -r directory events filename; do
if [ "$filename" = "myfile.py" ]; then
./myfile.py
fi
done
The ability to run custom commands when you save specific file extensions in VSCode. Can be used to act as a "watch" feature when working with code to run bundlers when the user saves their code.
These commands that can be executed when a file is saved, can be done in the
.vscode/settings.json
file or in the globalsettings.json
file. An indicator will be in the bottom tool bar which will indicate when a command is being executed and when the command has finished executing for builds that may take a few seconds.