Home Explore Blog CI



neovim

66th chunk of `runtime/doc/vimfn.txt`
717f391f7a4c631b132722f9d32528eee305a12cbf4160800000000100000fb5
 when it starts with an
		optional drive prefix and is followed by a '\' or '/'. UNC paths
		are always absolute.
		Example: >vim
			echo isabsolutepath('/usr/share/')	" 1
			echo isabsolutepath('./foobar')		" 0
			echo isabsolutepath('C:\Windows')	" 1
			echo isabsolutepath('foobar')		" 0
			echo isabsolutepath('\\remote\file')	" 1
<

                Parameters: ~
                  • {path} (`string`)

                Return: ~
                  (`0|1`)

isdirectory({directory})                                         *isdirectory()*
		The result is a Number, which is |TRUE| when a directory
		with the name {directory} exists.  If {directory} doesn't
		exist, or isn't a directory, the result is |FALSE|.  {directory}
		is any expression, which is used as a String.

                Parameters: ~
                  • {directory} (`string`)

                Return: ~
                  (`0|1`)

isinf({expr})                                                          *isinf()*
		Return 1 if {expr} is a positive infinity, or -1 a negative
		infinity, otherwise 0. >vim
			echo isinf(1.0 / 0.0)
<			1 >vim
			echo isinf(-1.0 / 0.0)
<			-1

                Parameters: ~
                  • {expr} (`number`)

                Return: ~
                  (`1|0|-1`)

islocked({expr})                                               *islocked()* *E786*
		The result is a Number, which is |TRUE| when {expr} is the
		name of a locked variable.
		The string argument {expr} must be the name of a variable,
		|List| item or |Dictionary| entry, not the variable itself!
		Example: >vim
			let alist = [0, ['a', 'b'], 2, 3]
			lockvar 1 alist
			echo islocked('alist')		" 1
			echo islocked('alist[1]')	" 0

<		When {expr} is a variable that does not exist you get an error
		message.  Use |exists()| to check for existence.

                Parameters: ~
                  • {expr} (`any`)

                Return: ~
                  (`0|1`)

isnan({expr})                                                          *isnan()*
		Return |TRUE| if {expr} is a float with value NaN. >vim
			echo isnan(0.0 / 0.0)
<			1

                Parameters: ~
                  • {expr} (`number`)

                Return: ~
                  (`0|1`)

items({dict})                                                          *items()*
		Return a |List| with all the key-value pairs of {dict}.  Each
		|List| item is a list with two items: the key of a {dict}
		entry and the value of this entry.  The |List| is in arbitrary
		order.  Also see |keys()| and |values()|.
		Example: >vim
			for [key, value] in items(mydict)
			   echo key .. ': ' .. value
			endfor
<
		A List or a String argument is also supported.  In these
		cases, items() returns a List with the index and the value at
		the index.

                Parameters: ~
                  • {dict} (`table`)

                Return: ~
                  (`any`)

jobpid({job})                                                         *jobpid()*
		Return the PID (process id) of |job-id| {job}.

                Parameters: ~
                  • {job} (`integer`)

                Return: ~
                  (`integer`)

jobresize({job}, {width}, {height})                                *jobresize()*
		Resize the pseudo terminal window of |job-id| {job} to {width}
		columns and {height} rows.
		Fails if the job was not started with `"pty":v:true`.

                Parameters: ~
                  • {job} (`integer`)
                  • {width} (`integer`)
                  • {height} (`integer`)

                Return: ~
                  (`any`)

jobstart({cmd} [, {opts}])                                          *jobstart()*
		Note: Prefer |vim.system()| in Lua (unless using `rpc`, `pty`, or `term`).

		Spawns {cmd} as a job.
		If {cmd} is a List it runs directly (no 'shell').
		If {cmd} is a String it runs in the 'shell', like this: >vim
		  call jobstart(split(&shell) + split(&shellcmdflag) + ['{cmd}'])
<		(See |shell-unquoting| for details.)

Title: isinf(), islocked(), isnan(), items(), jobpid(), jobresize(), and jobstart() functions
Summary
This section describes several Vimscript functions: `isinf()`, which checks if a number is infinite; `islocked()`, which checks if a variable is locked; `isnan()`, which checks if a number is NaN; `items()`, which returns a list of key-value pairs from a dictionary or index-value pairs from a list; `jobpid()`, which returns the process ID of a job; `jobresize()`, which resizes the pseudo terminal window of a job; and `jobstart()`, which starts a job.