Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ex "copy" command with ., -, or + (current, previous, or next line) at end of command stopped working #7058

Closed
patbl opened this issue Sep 4, 2021 · 0 comments
Labels
Milestone

Comments

@patbl
Copy link

patbl commented Sep 4, 2021

Describe the bug

In ex commands, you can use . to refer to the current line. So :5,.d means "delete everything between the 5th and current line (inclusive)." The dot doesn't work with the copy Ex command. It does, however, work with other commands, such as move and delete.

Also, ., -, and + work as long as they don't appear tat the very end of the command. So :.t0 will succesfully copy the current line to the top of the file. Because of this quirk, you can use -0 instead of . to reference the current line at the end of a copy command (e.g., :123t-0).

To Reproduce
Steps to reproduce the behavior:

  1. Enable Neovim (vim.enableNeovim: true).
  2. Open a file with some lines in it. Move to (e.g.) the third line.
  3. Type :1copy. (or :1co., or :1t.; they are equivalent AFAIK).
  4. See "E488: Trailing characters" error.

Expected behavior

The first line should be copied to the position after the current line.

Environment (please complete the following information):

  • Extension (VsCodeVim) version: v1.21.7
  • VSCode version: 1.60.0
  • OS: 11.5.2 (also tested on Ubuntu 21.04)
@patbl patbl changed the title Ex "copy" command with . (current line) stopped working Ex "copy" command with . (current line), - (previous line), or + (next line) at end of command stopped working Sep 4, 2021
@patbl patbl changed the title Ex "copy" command with . (current line), - (previous line), or + (next line) at end of command stopped working Ex "copy" command with ., -, or + (current, previous, or next line) at end of command stopped working Sep 4, 2021
@J-Fields J-Fields added this to the Backlog milestone Sep 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants