documentation: Update type() documentation

This commit is contained in:
ZyX
2016-03-07 09:35:44 +03:00
parent 82f249f829
commit 1bada1fde0

View File

@@ -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