Documentation
¶
Overview ¶
Package editor provides functionality for opening files in external editors.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Cmd ¶
Cmd returns a *exec.Cmd editing the given path with $EDITOR or nano if no $EDITOR is set. Deprecated: use Command or CommandContext instead.
Types ¶
type Option ¶
Option defines an editor option.
An Option may act differently in some editors, or not be supported in some of them.
func AtPosition ¶ added in v0.2.0
AtPosition opens the file at the given line and column in supported editors. If line or column is less than 1, they will be set to 1. If the editor only supports line numbers, the column will be ignored.
func EndOfLine ¶
func EndOfLine() Option
EndOfLine opens the file at the end of the line in supported editors.
func LineNumber ¶
LineNumber opens the file at the given line number in supported editors. If [number] is less than line 1, the file will be opened at line 1.