configure editor.

add install directions to readme.
This commit is contained in:
GitMatt 2025-01-18 09:24:59 -08:00
parent 9dce008ddd
commit 59af46a039
2 changed files with 13 additions and 2 deletions

View File

@ -0,0 +1,8 @@
# .plan: edit files
## install
```bash
uv tool install --from https://git.publicmatt.com/public/plan.git plan
```

View File

@ -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)])