Documentation
¶
Overview ¶
Package editor detects installed editors/IDEs and opens repositories in them. The chosen default is remembered in a small state file so the picker only appears until the user settles on one.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SaveDefault ¶
SaveDefault persists the chosen default editor id.
Types ¶
type Editor ¶
type Editor struct {
ID string // stable id used for the saved default
Name string // display name
Cmd string // CLI launcher on PATH
Args []string // args before the path (e.g. nvim none, idea none)
Apps []string // macOS .app bundle names, for the `open -a` fallback
Terminal bool // true for TUI editors that must run in the foreground
}
Editor describes a launchable editor.
func Available ¶
func Available() []Editor
Available returns the editors actually installed on this machine.
func (Editor) Command ¶
Command builds the command to open path. The bool reports whether it must run in the foreground (a terminal editor). Returns nil if it can't be launched.
Click to show internal directories.
Click to hide internal directories.