diff options
author | Bram Moolenaar <Bram@vim.org> | 2018-09-16 18:46:59 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2018-09-16 18:46:59 +0200 |
commit | 110bd60985c31e8978e9b071e2179f4233ef8557 (patch) | |
tree | d08c7814d0ca763dd5ee2fa85fee8e618e79b960 /runtime | |
parent | d2b58c0a2c665075a8cfef57db6e1b37d4523e02 (diff) | |
download | vim-git-110bd60985c31e8978e9b071e2179f4233ef8557.tar.gz |
patch 8.1.0401: can't get swap name of another bufferv8.1.0401
Problem: Can't get swap name of another buffer.
Solution: Add swapname(). (Ozaki Kiichi, closes #3441)
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/eval.txt | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index fff19da1a..a5c8a13e9 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -2417,6 +2417,7 @@ submatch({nr} [, {list}]) String or List substitute({expr}, {pat}, {sub}, {flags}) String all {pat} in {expr} replaced with {sub} swapinfo({fname}) Dict information about swap file {fname} +swapname({expr}) String swap file of buffer {expr} synID({lnum}, {col}, {trans}) Number syntax ID at {lnum} and {col} synIDattr({synID}, {what} [, {mode}]) String attribute {what} of syntax ID {synID} @@ -8042,6 +8043,13 @@ swapinfo({fname}) *swapinfo()* Not a swap file: does not contain correct block ID Magic number mismatch: Info in first block is invalid +swapname({expr}) *swapname()* + The result is the swap file path of the buffer {expr}. + For the use of {expr}, see |bufname()| above. + If buffer {expr} is the current buffer, the result is equal to + |:swapname| (unless no swap file). + If buffer {expr} has no swap file, returns an empty string. + 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. |