Skip to content

Commit

Permalink
Fix WSL2 Neovim clipboard
Browse files Browse the repository at this point in the history
  • Loading branch information
lucaslago committed Sep 12, 2020
1 parent 8a263f6 commit fa745c5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ubuntu-bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ if ! [ -d "/run/WSL" ]; then
snap install spotify
fi

if [ -d "/run/WSL" ]; then
echo "Running WSL2 bootstrap script"
sh ./wsl2-bootstrap.sh
fi

if ! command docker -v > /dev/null; then
echo "Installing Docker"
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
Expand Down
9 changes: 9 additions & 0 deletions wsl2-bootstrap.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

set -e

# Makes WSL2 + Neovim use windows clipboard https://github.com/neovim/neovim/wiki/FAQ#how-to-use-the-windows-clipboard-from-wsl
curl -sLo /tmp/win32yank.zip https://github.com/equalsraf/win32yank/releases/download/v0.0.4/win32yank-x64.zip
unzip -p /tmp/win32yank.zip win32yank.exe > /tmp/win32yank.exe
chmod +x /tmp/win32yank.exe
sudo mv /tmp/win32yank.exe ~/bin

0 comments on commit fa745c5

Please sign in to comment.