diff options
author | Bram Moolenaar <Bram@vim.org> | 2018-06-07 18:17:46 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2018-06-07 18:17:46 +0200 |
commit | d79a26219d7161e9211fd144f0e874aa5f6d251e (patch) | |
tree | 3473625909143ebb7ce777a42f4115a8bf056803 /runtime | |
parent | 680c99b2efc7e2a9e6b3d611133f43fb7f8c6811 (diff) | |
download | vim-git-d79a26219d7161e9211fd144f0e874aa5f6d251e.tar.gz |
patch 8.1.0039: cannot easily delete lines in another bufferv8.1.0039
Problem: Cannot easily delete lines in another buffer.
Solution: Add deletebufline().
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/eval.txt | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 1c56bf341..ead6b8928 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -2110,6 +2110,8 @@ cursor({lnum}, {col} [, {off}]) cursor({list}) Number move cursor to position in {list} deepcopy({expr} [, {noref}]) any make a full copy of {expr} delete({fname} [, {flags}]) Number delete the file or directory {fname} +deletebufline({expr}, {first}[, {last}]) + Number delete lines from buffer {expr} did_filetype() Number |TRUE| if FileType autocmd event used diff_filler({lnum}) Number diff filler lines about {lnum} diff_hlID({lnum}, {col}) Number diff highlighting at {lnum}/{col} @@ -3517,8 +3519,19 @@ delete({fname} [, {flags}]) *delete()* successful and -1 when the deletion failed or partly failed. Use |remove()| to delete an item from a |List|. - To delete a line from the buffer use |:delete|. Use |:exe| - when the line number is in a variable. + To delete a line from the buffer use |:delete| or + |deletebufline()|. + +deletebufline({expr}, {first}[, {last}]) *deletebufline()* + Delete lines {first} to {last} (inclusive) from buffer {expr}. + If {last} is omitted then delete line {first} only. + On success 0 is returned, on failure 1 is returned. + + For the use of {expr}, see |bufname()| above. + + {first} and {last} are used like with |setline()|. Note that + when using |line()| this refers to the current buffer. Use "$" + to refer to the last line in buffer {expr}. *did_filetype()* did_filetype() Returns |TRUE| when autocommands are being executed and the |