vim

package
v0.0.0-...-0e5ea14 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 16, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BufferGetCurrent

func BufferGetCurrent() *C.buf_T

buf_T *vimBufferGetCurrent(void);

func BufferGetId

func BufferGetId(vbuf *C.buf_T) int

int vimBufferGetId(buf_T *buf);

func BufferGetLastChangedTick

func BufferGetLastChangedTick(vbuf *C.buf_T) int

func BufferGetLine

func BufferGetLine(vbuf *C.buf_T, lineNum int) string

char_u *vimBufferGetLine(buf_T *buf, linenr_T lnum); typedef long linenr_T; buf_T -> file_buffer is a complicated struct

func BufferGetLineB

func BufferGetLineB(vbuf *C.buf_T, lineNum int) []byte

char_u *vimBufferGetLine(buf_T *buf, linenr_T lnum);

func BufferGetLineCount

func BufferGetLineCount(vbuf *C.buf_T) int

size_t vimBufferGetLineCount(buf_T *buf);

func BufferGetModified

func BufferGetModified(vbuf *C.buf_T) bool

int vimBufferGetModified(buf_T *buf);

func BufferLines

func BufferLines(vbuf *C.buf_T) []string

returns []string

func BufferLinesB

func BufferLinesB(vbuf *C.buf_T) [][]byte

returns [][]byte

func BufferNew

func BufferNew(flags int) *C.buf_T

buf_T *vimBufferLoad(char_u *ffname_arg, linenr_T lnum, int flags) buf_T *vimBufferNew(int flags)

func BufferOpen

func BufferOpen(filename string, lnum int, flags int) *C.buf_T

buf_T *vimBufferOpen(char_u *ffname_arg, linenr_T lnum, int flags);

func BufferSetCurrent

func BufferSetCurrent(vbuf *C.buf_T)

void vimBufferSetCurrent(buf_T *buf);

func BufferSetLines

func BufferSetLines(vbuf *C.buf_T, start, end int, ss []string, count int)

void vimBufferSetLines(buf_T *buf, linenr_T start, linenr_T end, char_u **lines, int count);

func BufferSetLinesB

func BufferSetLinesB(vbuf *C.buf_T, start, end int, bb [][]byte, count int)

void vimBufferSetLines(buf_T *buf, linenr_T start, linenr_T end, char_u **lines, int count);

func CursorGetLine

func CursorGetLine() int

linenr_T vimCursorGetLine(void);

func CursorGetPosition

func CursorGetPosition() [2]int

v.SetBufferText(e.vbuf, line, startChar, line, endChar, [][]byte{[]byte(edit.NewText)}) pos_T vimCursorGetPosition(void);

func CursorSetPosition

func CursorSetPosition(r, c int)

void vimCursorSetPosition(pos_T pos);

func CursorSetPosition_old

func CursorSetPosition_old(pos [2]int)

void vimCursorSetPosition(pos_T pos);

func Eval

func Eval(s string) string

func Execute

func Execute(s string)

void vimExecute(char_u *cmd);

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

func GetSubmode() C.subMode_T
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 Init

func Init(argc int)

void vimInit(int argc, char **argv);

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 Input2

func Input2(s string)

intended for strings of more than one character

func Key

func Key(s string)

void vimKey(char_u *key);

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

Types

type Buffer

type Buffer *C.buf_T

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL