Created
February 7, 2025 15:38
-
-
Save Bergiu/6acb9ac92c3e20d4d5b9b220eb57cac7 to your computer and use it in GitHub Desktop.
Copy and paste to clipboard in vim in wsl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" ~/.config/nvim/init.vim | |
" copy to clipboard in WSL | |
let g:clipboard = { | |
\ 'name': 'win32-clipboard', | |
\ 'copy': { | |
\ '+': 'clip.exe', | |
\ }, | |
\ 'paste': { | |
\ '+': '/home/CHANGEME/.config/nvim/paste.sh', | |
\ }, | |
\ } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# ~/.config/nvim/paste.sh | |
# You need to make this file executable: chmod +x ~/.config/nvim/paste.sh | |
powershell.exe -command "Get-Clipboard" | tr -d '\r' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment