Closed Penguin-SAMA closed 2 months ago
why would u want to paste in a file tree?
i dont think it's doable to paste in nvimtree buffer, i think this is normal.
no, i want to use <C-V>
to open a file in split buffer, because I found out that this is the default operation of nvimtree
ahh got it, but i dont think it's a bug. everyone use their computer differently.
I think there may be a conflict with the system's paste shortcut keys?
ys, i think it is.
But can I make it work properly without modifying the shortcut keys?
no, u have to modify it if u want to use it.
But I think the shortcut for "paste" should be <C-v>
on most machines these days. If this is a mechanism and not a bug, then this default shortcut should be unusable for most people?
Or is this just a phenomenon unique to Windows Terminal?
it's not the case on macos and linux.
u need to consider 3 levels of keymaps: system level, terminal level, other nvim keymaps so this is really hard to balance between between OSs.
u can suggest a better keymap u think is suitable or make a pr.
I think the main issue here boils down to the fact that the terminal holds all the cards when it comes to what gets sent to the TUI app. It's the "gatekeeper", catching all your keystrokes and deciding what to do with them - whether to handle them itself or pass them along to the TUI app. AFAIK most terminals do let you tweak which keys they handle internally and which ones they pass on. Checking out Windows Terminal's docs might shed some light on this.
But I think the shortcut for "paste" should be
<C-v>
on most machines these days. If this is a mechanism and not a bug, then this default shortcut should be unusable for most people Or is this just a phenomenon unique to Windows Terminal?
I gotta admit this one is kinda user-dependent. There are still tons of platforms or emulators that either don't use <C-v>
for pasting or won't mess with (or hijack) your input. Frankly the best advice we can offer is to get to know your terminal better if you really want <C-v>
to work in NvimTree, just like what @CharlesChiuGit suggested.
Oh I see, on MacOS the shortcut for pasting is <Command-V>
instead of <control-V>
.
That is indeed the influence of Windows Terminal.
I think <C-V>
is a good keymap so it doesn't need to be changed, so I removed the <Ctrl+V>
action in windows Terminal.
thanks for your help, and it's bad to use Windows :(
Version confirmation
Following prerequisites
Not a user config issue
Neovim version
NVIM v0.9.5
Operating system/version
WSL Ubuntu 24.04
Terminal name/version
Windows Terminal
$TERM environment variable
No response
Branch info
main (Default/Latest)
Fetch Preferences
SSH (use_ssh = true)
How to reproduce the issue
in NvimTree, when i use![image](https://github.com/ayamir/nvimdots/assets/50973632/9142aae9-2282-494f-a394-c73d443cd6a0)
<C-v>
but![image](https://github.com/ayamir/nvimdots/assets/50973632/c316f6d2-97ee-4458-8e32-1c07016c02f9)
<C-X>
is workI think there may be a conflict with the system's paste shortcut keys? But can I make it work properly without modifying the shortcut keys?
Expected behavior