Documentation ¶
Index ¶
- func BufferGetCurrent() *C.buf_T
- func BufferGetId(vbuf *C.buf_T) int
- func BufferGetLastChangedTick(vbuf *C.buf_T) int
- func BufferGetLine(vbuf *C.buf_T, lineNum int) string
- func BufferGetLineB(vbuf *C.buf_T, lineNum int) []byte
- func BufferGetLineCount(vbuf *C.buf_T) int
- func BufferGetModified(vbuf *C.buf_T) bool
- func BufferLines(vbuf *C.buf_T) []string
- func BufferLinesB(vbuf *C.buf_T) [][]byte
- func BufferNew(flags int) *C.buf_T
- func BufferOpen(filename string, lnum int, flags int) *C.buf_T
- func BufferSetCurrent(vbuf *C.buf_T)
- func BufferSetLines(vbuf *C.buf_T, start, end int, ss []string, count int)
- func BufferSetLinesB(vbuf *C.buf_T, start, end int, bb [][]byte, count int)
- func CursorGetLine() int
- func CursorGetPosition() [2]int
- func CursorSetPosition(r, c int)
- func CursorSetPosition_old(pos [2]int)
- func Eval(s string) string
- func Execute(s string)
- func GetMode() int
- func GetPendingOperator() (int, pendingOp_T)
- func GetSubmode() C.subMode_T
- func Init(argc int)
- func Input(s string)
- func Input2(s string)
- func Key(s string)
- func SearchGetMatchingPair() [2]int
- func VisualGetRange() [2][2]int
- func VisualGetType() int
- type Buffer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BufferGetLine ¶
char_u *vimBufferGetLine(buf_T *buf, linenr_T lnum); typedef long linenr_T; buf_T -> file_buffer is a complicated struct
func BufferGetLineB ¶
char_u *vimBufferGetLine(buf_T *buf, linenr_T lnum);
func BufferGetLineCount ¶
size_t vimBufferGetLineCount(buf_T *buf);
func BufferGetModified ¶
int vimBufferGetModified(buf_T *buf);
func BufferNew ¶
buf_T *vimBufferLoad(char_u *ffname_arg, linenr_T lnum, int flags) buf_T *vimBufferNew(int flags)
func BufferOpen ¶
buf_T *vimBufferOpen(char_u *ffname_arg, linenr_T lnum, int flags);
func BufferSetLines ¶
void vimBufferSetLines(buf_T *buf, linenr_T start, linenr_T end, char_u **lines, int count);
func BufferSetLinesB ¶
void vimBufferSetLines(buf_T *buf, linenr_T start, linenr_T end, char_u **lines, int count);
func CursorGetPosition ¶
func CursorGetPosition() [2]int
v.SetBufferText(e.vbuf, line, startChar, line, endChar, [][]byte{[]byte(edit.NewText)}) pos_T vimCursorGetPosition(void);
func CursorSetPosition_old ¶
func CursorSetPosition_old(pos [2]int)
void vimCursorSetPosition(pos_T pos);
func GetMode ¶
func GetMode() int
int vimGetMode(void); modes are in vim.h there are DEFINES for NORMAL, VISUAL, INSERT, OP_PENDING (blocking?) etc. NORMAL 1 VISUAL 2 (v -> 118; V -> 86; ctrl-v -> 22) OP_PENDING 4; examples "2d" "da" etc CMDLINE 8 INSERT 16 0x10 REPLACE -> NORMAL_BUSY 257 0x101 SEARCH 8 Note there are two modes which sometimes overlap and sometimes don't: the mode vim is in and the mode that listmango is in
func GetPendingOperator ¶
func GetPendingOperator() (int, pendingOp_T)
vimGetPendingOperator(pendingOp_T *pendingOp); unfortunately not very useful - does catch commands like 'd', 'c', 'Nd', 'Nc' not in use
func GetSubmode ¶
There are some modal input experiences that aren't considered
full-fledged modes, but are nevertheless a modal input state. Examples include insert-literal (C-V, C-G), search w/ confirmation, etc.
subMode_T vimGetSubMode(void); not in use
func Input ¶
func Input(s string)
void vimInput(char_u *input); intended for strings with one character (could be multi-byte) no error if string has more than one char
func SearchGetMatchingPair ¶
func SearchGetMatchingPair() [2]int
func VisualGetRange ¶
func VisualGetRange() [2][2]int
void vimVisualGetRange(pos_T *startPos, pos_T *endPos);
func VisualGetType ¶
func VisualGetType() int
vimVisualGetType() == Ctrl_V); int vimVisualGetType(void) { return VIsual_mode; } Visual = 118 'v' Visual Line = 86 'V' Visual block = 22 ctrl-v