Documentation
¶
Overview ¶
Package editor opens private note drafts in the user's external editor.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Draft ¶
type Draft struct {
Path string
// contains filtered or unexported fields
}
Draft owns a temporary AsciiDoc file. It never writes into the vault.
func (*Draft) Close ¶
func (draft *Draft) Close()
Close discards the draft file, including drafts explicitly marked for retention.
func (*Draft) Command ¶
Command resolves EDITOR, then VISUAL, then vi, supporting shell arguments. The draft path is passed separately so spaces and shell syntax in it remain literal.
func (*Draft) Finish ¶
Finish removes unchanged drafts and retains unfinished work when the UI exits.
func (*Draft) Keep ¶
func (draft *Draft) Keep()
Keep preserves even an unchanged draft after a failed edit or explicit request.
Click to show internal directories.
Click to hide internal directories.