rustlings
rustlings copied to clipboard
Add Active-Exercise-File Mode
I think it's a hassle to always open a new file for each new exercise in watch mode. It would be great, to only have one file where the exercise is located. Then if you delete the //I'm not done comment, the contents of the file changes to the next exercise. I am new to Rust so I don't have to much insight of how this could be implemented, but I have come up with two possible solutions:
Solution 1
Create one file where the contents of the active exercise gets copied into. Maybe it could be an extra option to the watch command
Solution 2
Use a symbolic link, that gets updated to the active exercise. This could be simply used alongside the original behaviour, without changing much, as far as I am aware.
Solution 3:
Allow rustlings to call a shell command of your choosing with the full path of the next exercise. Default it to $EDITOR. So if you want to do atom path/to/next or code path/to/next or clion path/to/next or vim path/to/next or whatever.
Suggested syntax:
rustlings watch -e atom or rustlings watch --editor atom
Why not just open the entire exercises folder?