Home Explore Blog CI



neovim

65th chunk of `runtime/doc/vimfn.txt`
ecb31b50681e43ef595fd99d671f2f12eadae1a3431df7590000000100000fb1
 just as
		many inputrestore() calls.
		Returns TRUE when out of memory, FALSE otherwise.

                Return: ~
                  (`integer`)

inputsecret({prompt} [, {text}])                                 *inputsecret()*
		This function acts much like the |input()| function with but
		two exceptions:
		a) the user's response will be displayed as a sequence of
		asterisks ("*") thereby keeping the entry secret, and
		b) the user's response will not be recorded on the input
		|history| stack.
		The result is a String, which is whatever the user actually
		typed on the command-line in response to the issued prompt.
		NOTE: Command-line completion is not supported.

                Parameters: ~
                  • {prompt} (`string`)
                  • {text} (`string?`)

                Return: ~
                  (`string`)

insert({object}, {item} [, {idx}])                                    *insert()*
		When {object} is a |List| or a |Blob| insert {item} at the start
		of it.

		If {idx} is specified insert {item} before the item with index
		{idx}.  If {idx} is zero it goes before the first item, just
		like omitting {idx}.  A negative {idx} is also possible, see
		|list-index|.  -1 inserts just before the last item.

		Returns the resulting |List| or |Blob|.  Examples: >vim
			let mylist = insert([2, 3, 5], 1)
			call insert(mylist, 4, -1)
			call insert(mylist, 6, len(mylist))
<		The last example can be done simpler with |add()|.
		Note that when {item} is a |List| it is inserted as a single
		item.  Use |extend()| to concatenate |Lists|.

                Parameters: ~
                  • {object} (`any`)
                  • {item} (`any`)
                  • {idx} (`integer?`)

                Return: ~
                  (`any`)

interrupt()                                                        *interrupt()*
		Interrupt script execution.  It works more or less like the
		user typing CTRL-C, most commands won't execute and control
		returns to the user.  This is useful to abort execution
		from lower down, e.g. in an autocommand.  Example: >vim
		function s:check_typoname(file)
		   if fnamemodify(a:file, ':t') == '['
		       echomsg 'Maybe typo'
		       call interrupt()
		   endif
		endfunction
		au BufWritePre * call s:check_typoname(expand('<amatch>'))
<

                Return: ~
                  (`any`)

invert({expr})                                                        *invert()*
		Bitwise invert.  The argument is converted to a number.  A
		List, Dict or Float argument causes an error.  Example: >vim
			let bits = invert(bits)
<

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

                Return: ~
                  (`integer`)

isabsolutepath({path})                                        *isabsolutepath()*
		The result is a Number, which is |TRUE| when {path} is an
		absolute path.
		On Unix, a path is considered absolute when it starts with '/'.
		On MS-Windows, it is considered absolute 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}

Title: inputsecret(), insert(), interrupt(), invert(), isabsolutepath(), isdirectory(), and isinf() functions
Summary
This section describes several Vimscript functions: `inputsecret()`, which gets user input without displaying it; `insert()`, which inserts an item into a List or Blob; `interrupt()`, which interrupts script execution; `invert()`, which performs a bitwise inversion; `isabsolutepath()`, which checks if a path is absolute; `isdirectory()`, which checks if a directory exists; and `isinf()`, which checks for infinity.