display
the string "rw-r--r--" or even "rw-------".
For setting permissions use |setfperm()|.
Parameters: ~
• {fname} (`string`)
Return: ~
(`string`)
getfsize({fname}) *getfsize()*
The result is a Number, which is the size in bytes of the
given file {fname}.
If {fname} is a directory, 0 is returned.
If the file {fname} can't be found, -1 is returned.
If the size of {fname} is too big to fit in a Number then -2
is returned.
Parameters: ~
• {fname} (`string`)
Return: ~
(`integer`)
getftime({fname}) *getftime()*
The result is a Number, which is the last modification time of
the given file {fname}. The value is measured as seconds
since 1st Jan 1970, and may be passed to strftime(). See also
|localtime()| and |strftime()|.
If the file {fname} can't be found -1 is returned.
Parameters: ~
• {fname} (`string`)
Return: ~
(`integer`)
getftype({fname}) *getftype()*
The result is a String, which is a description of the kind of
file of the given file {fname}.
If {fname} does not exist an empty string is returned.
Here is a table over different kinds of files and their
results:
Normal file "file"
Directory "dir"
Symbolic link "link"
Block device "bdev"
Character device "cdev"
Socket "socket"
FIFO "fifo"
All other "other"
Example: >vim
getftype("/home")
< Note that a type such as "link" will only be returned on
systems that support it. On some systems only "dir" and
"file" are returned.
Parameters: ~
• {fname} (`string`)
Return: ~
(`'file'|'dir'|'link'|'bdev'|'cdev'|'socket'|'fifo'|'other'`)
getjumplist([{winnr} [, {tabnr}]]) *getjumplist()*
Returns the |jumplist| for the specified window.
Without arguments use the current window.
With {winnr} only use this window in the current tab page.
{winnr} can also be a |window-ID|.
With {winnr} and {tabnr} use the window in the specified tab
page. If {winnr} or {tabnr} is invalid, an empty list is
returned.
The returned list contains two entries: a list with the jump
locations and the last used jump position number in the list.
Each entry in the jump location list is a dictionary with
the following entries:
bufnr buffer number
col column number
coladd column offset for 'virtualedit'
filename filename if available
lnum line number
Parameters: ~
• {winnr} (`integer?`)
• {tabnr} (`integer?`)
Return: ~
(`vim.fn.getjumplist.ret`)
getline({lnum} [, {end}]) *getline()*
Without {end} the result is a String, which is line {lnum}
from the current buffer. Example: >vim
getline(1)
< When {lnum} is a String that doesn't start with a
digit, |line()| is called to translate the String into a Number.
To get the line under the cursor: >vim
getline(".")
< When {lnum} is a number smaller than 1 or bigger than the
number of lines in the buffer, an empty string is returned.
When {end} is given the result is a |List| where each item is
a line from the current buffer in the range {lnum} to {end},
including line {end}.
{end} is used in the same way as {lnum}.
Non-existing lines are silently omitted.
When {end} is before {lnum} an empty |List| is returned.
Example: >vim
let start = line('.')
let end = search("^$") - 1
let lines = getline(start, end)
< To get lines from another buffer see |getbufline()| and
|getbufoneline()|
Parameters: ~