Skip to content

Latest commit

 

History

History
20 lines (14 loc) · 407 Bytes

README.md

File metadata and controls

20 lines (14 loc) · 407 Bytes

extedit

Open an external editor as part of the user interface of a command-line programm. Think git rebase -i.

import (
    "strings"
    "github.com/kioopi/extedit"
)

func main() {
    input := strings.NewReader("Line 1\nLine 2")

    diff := extedit.Invoke(input)

    # diff.Lines() []string contains the edited input.
    # diff.Differences []int  contains indexes of changed lines.
}