Documentation
¶
Index ¶
- Variables
- func Alias(args string, buff *demodel.CharBuffer, v demodel.Viewport)
- func CopyClipboard(From, To demodel.Position, buff *demodel.CharBuffer)
- func CutClipboard(From, To demodel.Position, buff *demodel.CharBuffer)
- func DeleteCursor(From, To demodel.Position, buff *demodel.CharBuffer)
- func Do(cmd string, buff *demodel.CharBuffer, v demodel.Viewport)
- func FindNext(From, To demodel.Position, buff *demodel.CharBuffer)
- func FindNextOrOpen(From, To demodel.Position, buff *demodel.CharBuffer, v demodel.Viewport)
- func FindNextOrOpenTag(From, To demodel.Position, buff *demodel.CharBuffer, v demodel.Viewport)
- func FocusViewport(idx uint, buff *demodel.CharBuffer, v demodel.Viewport) error
- func InsertSnarfBuffer(From, To demodel.Position, buff *demodel.CharBuffer)
- func MoveCursor(From, To demodel.Position, buff *demodel.CharBuffer)
- func OpenFile(filename string, buff *demodel.CharBuffer, v demodel.Viewport) error
- func OpenOrPerformAction(From, To demodel.Position, buff *demodel.CharBuffer, v demodel.Viewport)
- func OpenOrPerformTagAction(From, To demodel.Position, buff *demodel.CharBuffer, v demodel.Viewport)
- func PasteClipboard(From, To demodel.Position, buff *demodel.CharBuffer)
- func PerformAction(From, To demodel.Position, buff *demodel.CharBuffer, v demodel.Viewport)
- func PerformTagAction(From, To demodel.Position, buff *demodel.CharBuffer, v demodel.Viewport)
- func PlumbExecuteOrFindNext(From, To demodel.Position, buff *demodel.CharBuffer, v demodel.Viewport)
- func PlumbOrFindNext(From, To demodel.Position, buff *demodel.CharBuffer, v demodel.Viewport)
- func RegisterAction(cmd string, f func(string, *demodel.CharBuffer, demodel.Viewport))
- func RunOrExec(cmd string, buff *demodel.CharBuffer, v demodel.Viewport) error
- func SaveFile(From, To demodel.Position, buff *demodel.CharBuffer) error
- func TagPlumbOrFindNext(From, To demodel.Position, buff *demodel.CharBuffer, v demodel.Viewport)
Constants ¶
This section is empty.
Variables ¶
var ErrNoFile = errors.New("Can not save empty filename or nil buffer.")
var PlumbingReady bool
This boolean indicates whether plumbing is ready to be used. It should generally only be called by the main thread to flag that plumb messages are fine to use.
Until the main thread does that, plumb will fail, assuming that it hasn't been properly initialized.
Functions ¶
func Alias ¶
func Alias(args string, buff *demodel.CharBuffer, v demodel.Viewport)
Alias registers an alias for execution commands. It requires two parameters: a name, and a value. When a command is executed by either pressing enter or middle clicking, if the name is a prefix of the command, it's replaced by the value before getting executed. This allows you to make replacements such as Alias:s/:|sed:s/ in order to make the command s/foo/bar/ replaced by |sed:s/foo/bar/ and pipe the current selection through sed. There are no restrictions on names or values, other than that the name can not contain a space, since it's used as a delimiter when registering the alias.
func CopyClipboard ¶
func CopyClipboard(From, To demodel.Position, buff *demodel.CharBuffer)
func CutClipboard ¶
func CutClipboard(From, To demodel.Position, buff *demodel.CharBuffer)
func DeleteCursor ¶
func DeleteCursor(From, To demodel.Position, buff *demodel.CharBuffer)
func Do ¶
func Do(cmd string, buff *demodel.CharBuffer, v demodel.Viewport)
Do does a built in action that's been registered.
func FindNext ¶
func FindNext(From, To demodel.Position, buff *demodel.CharBuffer)
Changes Dot to next instance of the character sequence between From and To
func FindNextOrOpen ¶
func FindNextOrOpenTag ¶
func FocusViewport ¶
Focus the viewport v (which is assumed to be rendering buff), such that the character at buff.Buffer[idx] is visible somewhere on the screen.
func InsertSnarfBuffer ¶
func InsertSnarfBuffer(From, To demodel.Position, buff *demodel.CharBuffer)
func MoveCursor ¶
func MoveCursor(From, To demodel.Position, buff *demodel.CharBuffer)
func OpenOrPerformAction ¶
func OpenOrPerformTagAction ¶
func PasteClipboard ¶
func PasteClipboard(From, To demodel.Position, buff *demodel.CharBuffer)
func PerformAction ¶
func PerformTagAction ¶
func PlumbExecuteOrFindNext ¶
func PlumbOrFindNext ¶
func RegisterAction ¶
func TagPlumbOrFindNext ¶
Types ¶
This section is empty.