VSCodeVim / VSCodeVim/Vim

paragraph-wise yank and paste inserts paragraph before/after current character, instead of current line.

Open
#8,065 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
15.2k
Forks
1.5k
Avg merge
3d 18h
Merged PRs (30d)
6

Description

Describe the bug
When yanking and pasting paragraphs, P pastes the paragraph before the current character, rather than before the current line.

To Reproduce
Steps to reproduce the behavior:

In a file with content

Paragaph one
more paragraph one

Paragaph two
more paragraph two

Paragaph three
more paragraph three

Paragaph four
more paragraph four
  1. Put the cursor in paragraph three.
  2. Hit vapy to yank the entire paragraph.
  3. Put the cursor in the middle of the first line of paragraph two:
    image
  4. Hit P to paste the yanked paragraph.
  5. A copy of paragraph three is inserted before the current character:
    image

Expected behavior
A copy of paragraph three is inserted before the current line:
image

Screenshots
If applicable, add screenshots to help explain your problem.
If remapping-related, please attach log output: https://github.com/VSCodeVim/Vim#debugging-remappings.

Environment (please complete the following information):

  • Extension (VsCodeVim) version: v1.24.1
  • VSCode version: 1.72.2
  • OS: Intel Mac OS X 10_15_7

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file or test is named in the issue. First reproduce the paragraph-wise vapy and P steps in VSCodeVim using the supplied example, then trace the paste handling for paragraph selections. Done means P inserts the yanked paragraph before the current line rather than at the current character.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vscode
Domain
developer-experience, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.