To install Scoop (official docs), execute in Powershell:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
irm get.scoop.sh -outfile 'install-scoop.ps1'
get-help .\install-scoop.ps1
.\install-scoop.ps1
Add extras
bucket:
scoop bucket add extras
Install utilities:
scoop install ffmpeg libavif exiftool
scoop install python sublime-text
To install MSYS2 using Scoop:
scoop install msys2
Execute msys2
to do initial setup. After this, files in MSYS2 can be found in:
<scoop_root_path>\apps\msys2\current
and <scoop_root_path>\persist\msys2\
where <scoop_root_path>
is C:\Users\<user>\scoop
by default.
Install development utilities:
pacman -Syu
pacman -S git vim curl zsh tmux mingw-w64-ucrt-x86_64-jq
pacman -S mingw-w64-ucrt-x86_64-gcc mingw-w64-ucrt-x86_64-pkgconf
Now exit from msys2
and enter ucrt64
from Powershell.
If you want to change the default shell to zsh
, make LOGINSHELL=zsh
in <scoop_root>\apps\msys2\current\msys2_shell.cmd
.
This is much faster than Windows Powershell. Either download the MSI here, or use Scoop:
scoop install pwsh
To install MSYS2 using Scoop:
scoop install alacritty
If you want to use tmux
with Ctrl-Space as the prefix, you'll need to workaround the issue that Ctrl-Space (which sends a NULL character) is completely ignored for some reason in Windows. So map the tmux prefix to a sequence that you don't use otherwise, which I just kept to the default tmux prefix, Ctrl-b. Then have Alacritty send that sequence when you press Ctrl-Space by using the following config (ref1, ref2):
shell = "pwsh"
[window]
dimensions = { columns = 150, lines = 32 }
padding = { x = 4, y = 4 }
[selection]
save_to_clipboard = true
[[keyboard.bindings]]
key = "Space"
mods = "Control"
chars = "\u0002" # Ctrl-b
The above config should be saved to $APPDATA/alacritty/alacritty.toml
.
Note: Even with Alacritty, using Vim within Tmux (on MSYS2) is very sluggish. So recommended to run Vim outside Tmux.
This is required to compile C/C++ libraries or tools for Windows. Download the Visual Studio Installer from here. And select these from the "Individual components" tab:
- MSVC v143 - VS 2022 C++ x64/x86 build tools (latest)
- Windows 10 SDK (10.0.XXXXX.0)