microsoft / microsoft/terminal

Vim.exe can disable ctrl+v to paste in conhost, but not in Windows Terminal

Open
#11,267 5 comments 0 reactions 0 assignees View on GitHub
Area-Input Issue-Feature Product-Conpty Product-Terminal
Dominant language
C++
Stars
105k
Forks
9.6k
Avg merge
3d 17h
Merged PRs (30d)
29

Description

I map the Ctrl+V to Paste in Windows Terminal:
{
"command": "paste",
"keys": "ctrl+v"
},
to simulate what I can do in cmd.exe.

However, when I use the command-line version of vim, from cmd.exe, in Normal mode, if I hit "Ctrl+V", it correctly puts it into "Visual mode".
When I'm in cmd.exe outside of vim, just typing at the console, Ctrl+V will paste to the console as it's supposed to.

In Windows Terminal, with the above setting, Ctrl+V works from the console window, but in vim doesn't see the key-combination.

It would be good for Windows Terminal key bindings to only be in effect when it's typed at the console.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the Ctrl+V mapping in Windows Terminal with command-line Vim, comparing Vim Normal mode with input typed directly at the console. Trace how key bindings are applied relative to application input; done means the paste binding still works at the console while Ctrl+V reaches Vim for Visual mode.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
cli
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.