Documentation ¶
Index ¶
- Constants
- Variables
- type Command
- type Editor
- func (e *Editor) ActiveView() *view.View
- func (e *Editor) ActiveViewNode() *view.Tree
- func (e *Editor) CursorPosition() (int, int)
- func (e *Editor) Draw()
- func (e *Editor) DrawStatus(text []byte)
- func (e *Editor) Height() int
- func (e *Editor) Loop() error
- func (e *Editor) NewBufferFromFile(filename string) (*buffer.Buffer, error)
- func (e *Editor) Quit()
- func (e *Editor) Resize()
- func (e *Editor) SetActiveViewNode(node *view.Tree)
- func (e *Editor) SetMode(m Mode)
- func (e *Editor) SetStatus(format string, args ...interface{})
- func (e *Editor) SplitHorizontally()
- func (e *Editor) SplitVertically()
- type Mode
- type Overlay
Constants ¶
View Source
const ( ConfigWrapLeft = true // Allow wrapping cursor to the previous line with 'h' motion. ConfigWrapRight = true // Allow wrapping cursor to the next line with 'l' motion. )
Variables ¶
View Source
var ErrQuit = errors.New("quit")
Functions ¶
This section is empty.
Types ¶
type Editor ¶
type Editor struct { LastSearchTerm string // Event channels UIEvents chan termbox.Event Commands chan Command // contains filtered or unexported fields }
func (*Editor) ActiveView ¶
func (*Editor) ActiveViewNode ¶
func (*Editor) CursorPosition ¶
cursorPosition returns the absolute screen coordinates of the cursor
func (*Editor) DrawStatus ¶
func (*Editor) NewBufferFromFile ¶
func (*Editor) Resize ¶
func (e *Editor) Resize()
Call it manually only when views layout has changed.
func (*Editor) SetActiveViewNode ¶
func (*Editor) SetMode ¶
SetMode sets active editor mode. The specified mode instance will react to keys and other user input until another mode is set.
func (*Editor) SplitHorizontally ¶
func (e *Editor) SplitHorizontally()
func (*Editor) SplitVertically ¶
func (e *Editor) SplitVertically()
Click to show internal directories.
Click to hide internal directories.