Mercurial > vim
comparison runtime/doc/eval.txt @ 14043:cbad3b3f46b2 v8.1.0039
patch 8.1.0039: cannot easily delete lines in another buffer
commit https://github.com/vim/vim/commit/d79a26219d7161e9211fd144f0e874aa5f6d251e
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Jun 7 18:17:46 2018 +0200
patch 8.1.0039: cannot easily delete lines in another buffer
Problem: Cannot easily delete lines in another buffer.
Solution: Add deletebufline().
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 07 Jun 2018 18:30:07 +0200 |
parents | acb2dc112b06 |
children | d053ec57d886 |
comparison
equal
deleted
inserted
replaced
14042:3698895e08c6 | 14043:cbad3b3f46b2 |
---|---|
2108 cursor({lnum}, {col} [, {off}]) | 2108 cursor({lnum}, {col} [, {off}]) |
2109 Number move cursor to {lnum}, {col}, {off} | 2109 Number move cursor to {lnum}, {col}, {off} |
2110 cursor({list}) Number move cursor to position in {list} | 2110 cursor({list}) Number move cursor to position in {list} |
2111 deepcopy({expr} [, {noref}]) any make a full copy of {expr} | 2111 deepcopy({expr} [, {noref}]) any make a full copy of {expr} |
2112 delete({fname} [, {flags}]) Number delete the file or directory {fname} | 2112 delete({fname} [, {flags}]) Number delete the file or directory {fname} |
2113 deletebufline({expr}, {first}[, {last}]) | |
2114 Number delete lines from buffer {expr} | |
2113 did_filetype() Number |TRUE| if FileType autocmd event used | 2115 did_filetype() Number |TRUE| if FileType autocmd event used |
2114 diff_filler({lnum}) Number diff filler lines about {lnum} | 2116 diff_filler({lnum}) Number diff filler lines about {lnum} |
2115 diff_hlID({lnum}, {col}) Number diff highlighting at {lnum}/{col} | 2117 diff_hlID({lnum}, {col}) Number diff highlighting at {lnum}/{col} |
2116 empty({expr}) Number |TRUE| if {expr} is empty | 2118 empty({expr}) Number |TRUE| if {expr} is empty |
2117 escape({string}, {chars}) String escape {chars} in {string} with '\' | 2119 escape({string}, {chars}) String escape {chars} in {string} with '\' |
3515 | 3517 |
3516 The result is a Number, which is 0 if the delete operation was | 3518 The result is a Number, which is 0 if the delete operation was |
3517 successful and -1 when the deletion failed or partly failed. | 3519 successful and -1 when the deletion failed or partly failed. |
3518 | 3520 |
3519 Use |remove()| to delete an item from a |List|. | 3521 Use |remove()| to delete an item from a |List|. |
3520 To delete a line from the buffer use |:delete|. Use |:exe| | 3522 To delete a line from the buffer use |:delete| or |
3521 when the line number is in a variable. | 3523 |deletebufline()|. |
3524 | |
3525 deletebufline({expr}, {first}[, {last}]) *deletebufline()* | |
3526 Delete lines {first} to {last} (inclusive) from buffer {expr}. | |
3527 If {last} is omitted then delete line {first} only. | |
3528 On success 0 is returned, on failure 1 is returned. | |
3529 | |
3530 For the use of {expr}, see |bufname()| above. | |
3531 | |
3532 {first} and {last} are used like with |setline()|. Note that | |
3533 when using |line()| this refers to the current buffer. Use "$" | |
3534 to refer to the last line in buffer {expr}. | |
3522 | 3535 |
3523 *did_filetype()* | 3536 *did_filetype()* |
3524 did_filetype() Returns |TRUE| when autocommands are being executed and the | 3537 did_filetype() Returns |TRUE| when autocommands are being executed and the |
3525 FileType event has been triggered at least once. Can be used | 3538 FileType event has been triggered at least once. Can be used |
3526 to avoid triggering the FileType event again in the scripts | 3539 to avoid triggering the FileType event again in the scripts |