diff --git a/README.md b/README.md index f7488d3..a9199db 100644 --- a/README.md +++ b/README.md @@ -185,3 +185,25 @@ This may include: - Measuring the time ## Other usefull tasks [Bonus Points] + +#### Settings.json +Instead of running +```shell +black --line-length 120 ~/git/plr-exercise +``` +each time you want to reformat, you can instead open your vscode user settings: + +`ctrl+shit+p` -> "Open User Settings (JSON)" + +_Note:_ if you want this to apply only to your current project (not all your vscode projects), open workspace settings instead. + +and edit it to add python options that format automatically every time you save: +``` + "[python]": { + "editor.formatOnSave": true, + "editor.defaultFormatter": "ms-python.black-formatter", + }, + "black-formatter.args": [ + "--line-length=120" // Or anything you prefer. + ], +```