# vim: Set \`\[\` and \`\]\` marks to paste destination \(\#56593\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/c98f1cbe1abf3ffbdd1c32dfa4f1b2d03fd358b8)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: c98f1cbe1abf3ffbdd1c32dfa4f1b2d03fd358b8

Requested commit: c98f1cbe1abf3ffbdd1c32dfa4f1b2d03fd358b8

Commit: c98f1cbe1abf3ffbdd1c32dfa4f1b2d03fd358b8

Tree: cbd662c997a494d88b93e4213cde853fa6dda8d7

Author: Xiaobo Liu

Committer: GitHub

## Message

```
vim: Set `[` and `]` marks to paste destination (#56593)

Previously, the `[` and `]` marks always pointed to the yank source
location. After a paste operation, they now correctly point to the start
and end of the pasted text in the destination buffer.

This enables workflows like `v]` to select just-pasted text, and fixes
the `gp` keymap pattern shown in the issue.


Closes https://github.com/zed-industries/zed/issues/56404

Release Notes:

- vim: Made `[` and `]` marks point to the start and end of pasted text
after a paste operation.

---------

Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
Co-authored-by: Tom Houlé <tom@tomhoule.com>
```

## Parents

- [3a44d0f01033ea477341632610d89f5d2a0522e8](https://git.cafe/gitcafe/zed/commit/3a44d0f01033ea477341632610d89f5d2a0522e8?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/c98f1cbe1abf3ffbdd1c32dfa4f1b2d03fd358b8?format=markdown)
