VSCodeVim / VSCodeVim/Vim

Retain rich text properties (syntax highlighting) when yanking text

Open
#6,624 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Describe the bug
visual mode selected text copied from VSC using Ctrl + C and pasted into other apps looses syntax highlighting.
Although if we Copy text using VSC Right Click menu option, then it retains syntax highlighting, wherever we paste.
e.g. into Outlook or OneNote

To Reproduce

  1. To visual select few line : Shift + V
  2. To copy text to system clipboard : Ctrl + C
  3. To paste into OneNote : Ctrl + V

Expected behavior
Preserve syntax highlighting colors as they are preserved while Right Click + Copy option

Screenshots

Environment (please complete the following information):

  • Extension (VsCodeVim) version: v1.20.2
  • VSCode version: 1.56.2
  • OS: Windows

Additional context

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

Reproduce the issue in VS Code on Windows by comparing visual-mode Ctrl+C with the context-menu Copy, then paste both results into OneNote or Outlook. Trace the extension's clipboard handling and confirm that yanked text preserves the syntax-highlighting formatting when pasted into other applications.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vscode
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.