aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-04-29 19:20:22 +0200
committerJustin M. Keyes <justinkz@gmail.com>2019-04-29 19:55:42 +0200
commit24b7462b3cbf9a70f07f0a8e8da562a365cdc37a (patch)
tree59bc0d9761679ba4f0528bf591e0adab2b934622 /runtime
parenta0d723db55cf2b81e3bd9271cda9b1b58a5c9f3c (diff)
downloadrneovim-24b7462b3cbf9a70f07f0a8e8da562a365cdc37a.tar.gz
rneovim-24b7462b3cbf9a70f07f0a8e8da562a365cdc37a.tar.bz2
rneovim-24b7462b3cbf9a70f07f0a8e8da562a365cdc37a.zip
vim-patch:8.1.0313: information about a swap file is unavailable
Problem: Information about a swap file is unavailable. Solution: Add swapinfo(). (Enzo Ferber) https://github.com/vim/vim/commit/00f123a56585363cd13f062fd3bb123efcfaa664
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/eval.txt17
1 files changed, 17 insertions, 0 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index b425e1b591..0472a67d18 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -2321,6 +2321,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}
+swapinfo({fname}) Dict information about swap file {fname}
synID({lnum}, {col}, {trans}) Number syntax ID at {lnum} and {col}
synIDattr({synID}, {what} [, {mode}])
String attribute {what} of syntax ID {synID}
@@ -7758,6 +7759,22 @@ substitute({expr}, {pat}, {sub}, {flags}) *substitute()*
|submatch()| returns. Example: >
:echo substitute(s, '\(\x\x\)', {m -> '0x' . m[1]}, 'g')
+swapinfo({fname}) swapinfo()
+ The result is a dictionary, which holds information about the
+ swapfile {fname}. The available fields are:
+ version VIM version
+ user user name
+ host host name
+ fname original file name
+ pid PID of the VIM process that created the swap
+ file
+ mtime last modification time in seconds
+ inode Optional: INODE number of the file
+ In case of failure an "error" item is added with the reason:
+ Cannot open file: file not found or in accessible
+ Cannot read file: cannot read first block
+ magic number mismatch: info in first block is invalid
+
synID({lnum}, {col}, {trans}) *synID()*
The result is a Number, which is the syntax ID at the position
{lnum} and {col} in the current window.