aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-04-19 12:06:45 +0800
committerGitHub <noreply@github.com>2023-04-19 12:06:45 +0800
commitc218109744e5aec702b10d4a8bf233b758dacc79 (patch)
tree91b3cff369f70f248bb06a15b6d32db77006391b /runtime
parentdd8781128f4b93d402bab281d11b85f2c45b987e (diff)
parent1c12f844ad6db504e1435b5e4b633eb87b932180 (diff)
downloadrneovim-c218109744e5aec702b10d4a8bf233b758dacc79.tar.gz
rneovim-c218109744e5aec702b10d4a8bf233b758dacc79.tar.bz2
rneovim-c218109744e5aec702b10d4a8bf233b758dacc79.zip
Merge pull request #23191 from zeertzjq/vim-9.0.1007
vim-patch:9.0.{0369,0372,0426,0514,0545,0560,0561,1005,1007,1008,1009,1010,1012,1020,1021,1034}
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/builtin.txt12
-rw-r--r--runtime/doc/usr_41.txt1
2 files changed, 13 insertions, 0 deletions
diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt
index 15ccfd9b92..9a8ce4d2ad 100644
--- a/runtime/doc/builtin.txt
+++ b/runtime/doc/builtin.txt
@@ -506,6 +506,7 @@ submatch({nr} [, {list}]) String or List
specific match in ":s" or substitute()
substitute({expr}, {pat}, {sub}, {flags})
String all {pat} in {expr} replaced with {sub}
+swapfilelist() List swap files found in 'directory'
swapinfo({fname}) Dict information about swap file {fname}
swapname({buf}) String swap file of buffer {buf}
synID({lnum}, {col}, {trans}) Number syntax ID at {lnum} and {col}
@@ -8417,6 +8418,17 @@ substitute({string}, {pat}, {sub}, {flags}) *substitute()*
Can also be used as a |method|: >
GetString()->substitute(pat, sub, flags)
+swapfilelist() *swapfilelist()*
+ Returns a list of swap file names, like what "vim -r" shows.
+ See the |-r| command argument. The 'directory' option is used
+ for the directories to inspect. If you only want to get a
+ list of swap files in the current directory then temporarily
+ set 'directory' to a dot: >
+ let save_dir = &directory
+ let &directory = '.'
+ let swapfiles = swapfilelist()
+ let &directory = save_dir
+
swapinfo({fname}) *swapinfo()*
The result is a dictionary, which holds information about the
swapfile {fname}. The available fields are:
diff --git a/runtime/doc/usr_41.txt b/runtime/doc/usr_41.txt
index 17a34b1236..89111535ca 100644
--- a/runtime/doc/usr_41.txt
+++ b/runtime/doc/usr_41.txt
@@ -883,6 +883,7 @@ Buffers, windows and the argument list:
getwininfo() get a list with window information
getchangelist() get a list of change list entries
getjumplist() get a list of jump list entries
+ swapfilelist() list of existing swap files in 'directory'
swapinfo() information about a swap file
swapname() get the swap file path of a buffer