Lines Matching refs:buffer

15 7. Buffer userdata		|lua-buffer|
32 :lua local curbuf = vim.buffer() curbuf[7] = "line #7"
55 local curline = vim.buffer()[linenr]
106 and manage buffers (|lua-buffer|) and windows (|lua-window|). However,
107 procedures that alter buffer content, open new buffers, and change cursor
116 module also includes routines for buffer, window, and current line queries,
154 vim.buffer([arg]) If "arg" is a number, returns buffer with
155 number "arg" in the buffer list or, if "arg"
156 is a string, returns buffer whose full or short
158 (nil value, not string) if the buffer is not
160 'true' returns the first buffer in the buffer
161 list or else the current buffer.
171 "dict", "funcref", "buffer", or "window" if
172 {arg} is a list, dictionary, funcref, buffer,
205 vim.open({fname}) Opens a new buffer for file {fname} and
206 returns it. Note that the buffer is not set as
244 Buffer-scoped (|b:|) variables for the current buffer.
409 7. Buffer userdata *lua-buffer*
411 Buffer userdata represent vim buffers. A buffer userdata "b" has the following
416 o "b()" sets "b" as the current buffer.
417 o "#b" is the number of lines in buffer "b".
420 o "b.name" contains the short name of buffer "b" (read-only).
421 o "b.fname" contains the full name of buffer "b" (read-only).
422 o "b.number" contains the position of buffer "b" in the buffer list
428 position "pos" in the buffer. The default value for "pos" is
430 the buffer.
431 o "b:next()" returns the buffer next to "b" in the buffer list.
432 o "b:previous()" returns the buffer previous to "b" in the buffer
434 o "b:isvalid()" returns 'true' (boolean) if buffer "b" corresponds to
435 a "real" (not freed from memory) Vim buffer.
439 :lua b = vim.buffer() -- current buffer
446 :lua vim.open"myfile"() -- open buffer and set it as current
450 local b = vim.buffer(true) -- first buffer in list
469 o "w.buffer" contains the buffer of window "w" (read-only).
485 :lua print(w.buffer.name, w.line, w.col)