Documentation ¶
Index ¶
- Constants
- func RuneWidthBackJump(r rune, runes []rune, runeOffset, spacingOffset int) int
- func RuneWidthJump(r rune, offset int) int
- type File
- func (file *File) Add(character rune) (xPosition int, addedLine bool)
- func (file *File) Backspace() (xPosition int, deletedLine bool)
- func (file *File) CanSafeQuit() bool
- func (file *File) Down(isInsert bool) (wasPossible bool, xPosition int)
- func (file *File) EndOfLine(isInsert bool) (xPosition int)
- func (file *File) Init(fileName string)
- func (file *File) JumpToBottom() (xPosition int)
- func (file *File) JumpToTop() (xPosition int)
- func (file *File) Left() (xPosition int)
- func (file *File) NextWordEnd() (xPosition int, linesDown int)
- func (file *File) NextWordStart() (xPosition int, linesDown int)
- func (file *File) PrevWordStart() (xPosition int, linesUp int)
- func (file *File) Remove() (xPosition int)
- func (file *File) RemoveBefore() (xPosition int)
- func (file *File) RemoveLine(isInsert bool) (xPosition int, wasFirst bool, wasLast bool)
- func (file *File) RemoveRestOfLine(isInsert bool) (xPosition int)
- func (file *File) Right(isInsert bool) (xPosition int)
- func (file *File) Save() error
- func (file *File) StartOfLine() (xPosition int)
- func (file *File) Up(isInsert bool) (wasPossible bool, xPosition int)
- type Line
Constants ¶
const TabSize = 8
Variables ¶
This section is empty.
Functions ¶
func RuneWidthBackJump ¶ added in v0.4.0
func RuneWidthJump ¶ added in v0.4.0
Types ¶
type File ¶ added in v0.4.0
type File struct { Name string First *Line Current *Line Lines int // contains filtered or unexported fields }
func (*File) CanSafeQuit ¶ added in v0.4.0
func (*File) JumpToBottom ¶ added in v0.5.0
func (*File) NextWordEnd ¶ added in v0.5.0
NextWordEnd will move the cursor to the end of the current word, unless the cursor is at the end of a word or on whitespace, in which case it will move to the end of the next word, if there is one, otherwise it will move the cursor to the end of the file.
func (*File) NextWordStart ¶ added in v0.5.0
NextWordStart will move the cursor to the start of the next word, unless there is no next word, in which case the cursor moves to the end of the file.
func (*File) PrevWordStart ¶ added in v0.5.0
PrevWordStart will move the cursor to the start of the current word, unless the cursor is at the start of a word or on whitespace, in which case it will move to the start of the previous word, if there is one, otherwise it will move the cursor to the start of the file.