mirror of
https://github.com/neovim/neovim.git
synced 2025-11-21 09:36:29 +00:00
documentation: Update type() documentation
This commit is contained in:
@@ -6789,6 +6789,8 @@ type({expr}) *type()*
|
||||
List: 3
|
||||
Dictionary: 4
|
||||
Float: 5
|
||||
Boolean: 6 (|v:true| and |v:false|)
|
||||
Null: 7 (|v:null|)
|
||||
To avoid the magic numbers it should be used this way: >
|
||||
:if type(myvar) == type(0)
|
||||
:if type(myvar) == type("")
|
||||
@@ -6796,6 +6798,10 @@ type({expr}) *type()*
|
||||
:if type(myvar) == type([])
|
||||
:if type(myvar) == type({})
|
||||
:if type(myvar) == type(0.0)
|
||||
:if type(myvar) == type(v:true)
|
||||
< In place of checking for |v:null| type it is better to check
|
||||
for |v:null| directly as it is the only value of this type: >
|
||||
:if myvar is v:null
|
||||
|
||||
undofile({name}) *undofile()*
|
||||
Return the name of the undo file that would be used for a file
|
||||
|
||||
Reference in New Issue
Block a user