editor

package
v0.0.0-...-b8911e7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 13, 2023 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfiguredExternalCommand

func ConfiguredExternalCommand() string

ConfiguredExternalCommand returns the external command that should be used to open the editor.

This is either the value of the EDITOR environment variable, or "vim" if that is not set.

func OpenExternal

func OpenExternal(buffer string) tea.Cmd

OpenExternal opens the external editor and returns a command that will wait for it to finish.

The buffer is the initial contents of the file.

Types

type ExternalFinishedMsg

type ExternalFinishedMsg struct {
	Err    error
	Buffer []byte
}

ExternalFinishedMsg is a message that is sent when the external editor finishes (either successfully or with an error). The buffer is the contents of the file that was edited.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL