@@ -2992,7 +2992,11 @@ bufadd({name}) *bufadd()*
2992
2992
number. Otherwise return the buffer number of the newly
2993
2993
created buffer. When {name} is an empty string then a new
2994
2994
buffer is always created.
2995
-
The buffer will not have' 'buflisted' set.
2995
+
The buffer will not have 'buflisted' set and not be loaded
2996
+
yet. To add some text to the buffer use this: >
2997
+
let bufnr = bufadd('someName')
2998
+
call bufload(bufnr)
2999
+
call setbufline(bufnr, 1, ['some', 'text'])
2996
3000
< Can also be used as a |method|: >
2997
3001
let bufnr = 'somename'->bufadd()
2998
3002
@@ -8704,7 +8708,7 @@ setline({lnum}, {text}) *setline()*
8704
8708
Can also be used as a |method|, passing the text as the base: >
8705
8709
GetText()->setline(lnum)
8706
8710
8707
-
setloclist({nr}, {list}[, {action}[, {what}]]) *setloclist()*
8711
+
setloclist({nr}, {list} [, {action} [, {what}]]) *setloclist()*
8708
8712
Create or replace or add to the location list for window {nr}.
8709
8713
{nr} can be the window number or the |window-ID|.
8710
8714
When {nr} is zero the current window is used.
@@ -8720,6 +8724,10 @@ setloclist({nr}, {list}[, {action}[, {what}]]) *setloclist()*
8720
8724
only the items listed in {what} are set. Refer to |setqflist()|
8721
8725
for the list of supported keys in {what}.
8722
8726
8727
+
Can also be used as a |method|, the base is passed as the
8728
+
second argument: >
8729
+
GetLoclist()->setloclist(winnr)
8730
+
8723
8731
setmatches({list} [, {win}]) *setmatches()*
8724
8732
Restores a list of matches saved by |getmatches() for the
8725
8733
current window|. Returns 0 if successful, otherwise -1. All
@@ -8728,6 +8736,9 @@ setmatches({list} [, {win}]) *setmatches()*
8728
8736
If {win} is specified, use the window with this number or
8729
8737
window ID instead of the current window.
8730
8738
8739
+
Can also be used as a |method|: >
8740
+
GetMatches()->setmatches()
8741
+
<
8731
8742
*setpos()*
8732
8743
setpos({expr}, {list})
8733
8744
Set the position for String {expr}. Possible values:
@@ -8777,8 +8788,10 @@ setpos({expr}, {list})
8777
8788
also set the preferred column. Also see the "curswant" key in
8778
8789
|winrestview()|.
8779
8790
8791
+
Can also be used as a |method|: >
8792
+
GetPosition()->setpos('.')
8780
8793
8781
-
setqflist({list} [, {action}[, {what}]]) *setqflist()*
8794
+
setqflist({list} [, {action} [, {what}]]) *setqflist()*
8782
8795
Create or replace or add to the quickfix list.
8783
8796
8784
8797
If the optional {what} dictionary argument is supplied, then
@@ -8887,7 +8900,10 @@ setqflist({list} [, {action}[, {what}]]) *setqflist()*
8887
8900
independent of the 'errorformat' setting. Use a command like
8888
8901
`:cc 1` to jump to the first position.
8889
8902
8890
-
8903
+
Can also be used as a |method|, the base is passed as the
8904
+
second argument: >
8905
+
GetErrorlist()->setqflist()
8906
+
<
8891
8907
*setreg()*
8892
8908
setreg({regname}, {value} [, {options}])
8893
8909
Set the register {regname} to {value}.
@@ -8944,6 +8960,10 @@ setreg({regname}, {value} [, {options}])
8944
8960
nothing: >
8945
8961
:call setreg('a', '', 'al')
8946
8962
8963
+
< Can also be used as a |method|, the base is passed as the
8964
+
second argument: >
8965
+
GetText()->setreg('a')
8966
+
8947
8967
settabvar({tabnr}, {varname}, {val}) *settabvar()*
8948
8968
Set tab-local variable {varname} to {val} in tab page {tabnr}.
8949
8969
|t:var|
@@ -8952,6 +8972,9 @@ settabvar({tabnr}, {varname}, {val}) *settabvar()*
8952
8972
Tabs are numbered starting with one.
8953
8973
This function is not available in the |sandbox|.
8954
8974
8975
+
Can also be used as a |method|, the base is used as the value: >
8976
+
GetValue()->settabvar(tab, name)
8977
+
8955
8978
settabwinvar({tabnr}, {winnr}, {varname}, {val}) *settabwinvar()*
8956
8979
Set option or local variable {varname} in window {winnr} to
8957
8980
{val}.
@@ -8968,6 +8991,9 @@ settabwinvar({tabnr}, {winnr}, {varname}, {val}) *settabwinvar()*
8968
8991
:call settabwinvar(3, 2, "myvar", "foobar")
8969
8992
< This function is not available in the |sandbox|.
8970
8993
8994
+
Can also be used as a |method|, the base is used as the value: >
8995
+
GetValue()->settabwinvar(tab, winnr, name)
8996
+
8971
8997
settagstack({nr}, {dict} [, {action}]) *settagstack()*
8972
8998
Modify the tag stack of the window {nr} using {dict}.
8973
8999
{nr} can be the window number or the |window-ID|.
@@ -9001,17 +9027,25 @@ settagstack({nr}, {dict} [, {action}]) *settagstack()*
9001
9027
call settagstack(1003, stack)
9002
9028
unlet stack
9003
9029
<
9030
+
Can also be used as a |method|, the base is used as the Dict: >
9031
+
GetStack()->settagstack(winnr)
9004
9032
9005
9033
setwinvar({nr}, {varname}, {val}) *setwinvar()*
9006
9034
Like |settabwinvar()| for the current tab page.
9007
9035
Examples: >
9008
9036
:call setwinvar(1, "&list", 0)
9009
9037
:call setwinvar(2, "myvar", "foobar")
9010
9038
9039
+
< Can also be used as a |method|, the base is used as the value: >
9040
+
GetValue()->setwinvar(winnr, name)
9041
+
9011
9042
sha256({string}) *sha256()*
9012
9043
Returns a String with 64 hex characters, which is the SHA256
9013
9044
checksum of {string}.
9014
9045
9046
+
Can also be used as a |method|: >
9047
+
GetText()->sha256()
9048
+
9015
9049
shellescape({string} [, {special}]) *shellescape()*
9016
9050
Escape {string} for use as a shell command argument.
9017
9051
@@ -9043,6 +9077,8 @@ shellescape({string} [, {special}]) *shellescape()*
9043
9077
:call system("chmod +w -- " . shellescape(expand("%")))
9044
9078
< See also |::S|.
9045
9079
9080
+
Can also be used as a |method|: >
9081
+
GetCommand()->shellescape()
9046
9082
9047
9083
shiftwidth([{col}]) *shiftwidth()*
9048
9084
Returns the effective value of 'shiftwidth'. This is the
@@ -9065,6 +9101,9 @@ shiftwidth([{col}]) *shiftwidth()*
9065
9101
'vartabstop' feature. If no {col} argument is given, column 1
9066
9102
will be assumed.
9067
9103
9104
+
Can also be used as a |method|: >
9105
+
GetColumn()->shiftwidth()
9106
+
9068
9107
sign_ functions are documented here: |sign-functions-details|
9069
9108
9070
9109
simplify({filename}) *simplify()*
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4