diff --git a/README.md b/README.md index e69de29..d3c1e18 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,8 @@ +# .plan: edit files + +## install + +```bash +uv tool install --from https://git.publicmatt.com/public/plan.git plan +``` + diff --git a/src/plan/path.py b/src/plan/path.py index 1fc7e5c..4df47b7 100644 --- a/src/plan/path.py +++ b/src/plan/path.py @@ -1,5 +1,7 @@ -from pathlib import Path +import os from datetime import datetime +from pathlib import Path + from .templates import default @@ -16,4 +18,5 @@ def open(plan: Path): plan.touch() with plan.open("rw") as f: f.write(default()) - subprocess.run(["nvim", str(plan)]) + editor = os.getenv("EDITOR", "nvim") + subprocess.run([editor, str(plan)])