I remap Caps Lock to Left Ctrl.
- Windows: Use Microsoft PowerToys's Keyboard Manager.
- Mac: System Preferences => Keyboard => Modifier Keys.
- Ubuntu:
sudo apt install gnome-tweaks
=>gnome-tweaks
=> Keyboard & mouse => Additional Layout Options => Ctrl position => Swap Ctrl and Caps Lock.
- Vim - Vim Keybindings
- Python - Python Language Support
- Go - Go Language Support
- erlang - Erlang Language Support
- Even Better TOML - TOML Language Support
- rust-analyzer - Rust Language Support
- CodeLLDB - Debugger Based on LLDB for Compiled Languages like Rust and C++
- Visual Studio IntelliCode - AI-assisted IntelliSense for Python, TypeScript/JavaScript and Java.
- Foam recommended extensions.
- Code Spell Checker
- GitLens
- Prettier - Javascript/Typescript formatter
- Mypy Type Checker - Mypy
- Live Server - Launch a development local server. Useful for previewing HTML files over SSH
- C# - C# Language Support
- CSharpier - Auto-format C# code using CSharpier
- Rainbow CSV - CSV syntax highlighting
- Flake8 - Flake8
- Black - Black
- Ruff - Ruff
- vscode-pdf - PDF preview
- C/C++ Extension Pack - C/C++ related extensions
- MacOS: Copy keybindings-macos.json to to the appropriate location.
- Ubuntu: Copy keybindings-ubuntu.json to to the appropriate location.
Copy settings.json to the appropriate locations.
First, have VsVim
manage the following key bindings:
- Ctrl+[
- Ctrl+B
- Ctrl+F
- Ctrl+R
- Ctrl+V
- Ctrl+W
Second, search for key bindings
to bring up the keyboard settings (Environment > Keyboard), then modify the following:
Edit.LineUp
=> Ctrl+K (Text Editor): Move up in the suggestions.Edit.LineDown
=> Ctrl+J (Text Editor): Move down in the suggestions.
Lastly, copy .vsvimrc
to C:\Users\<username>
.
For MacOS, I use iTerm2, and I modify the key mappings to allow skipping words backward and forward:
(Based on the instructions from this page)
- Go to Settings -> Profiles -> Keys.
- Set
Left Option Key
toEsc+
. - Go to Key Mappings.
- Find or create a key mapping for
⌥←
, set Action to beSend Escape Sequence
and set Esc+ to beb
. - Find or create a key mapping for
⌥→
, set Action to beSend Escape Sequence
and set Esc+ to bef
.
I use zsh with ohmyzsh. Follow the instructions here to install both. I also use the Powerlevel10k theme. Follow the instructions on its README to install. It comes with a nice installation wizard, so it should be quite simple. For Ubuntu, you do need to install the recommended fonts manually, and the instructions are here.
For MacOS, simply follow the instructions here to add the ssh key to the ssh agent.
For Ubuntu, install keychain
(sudo apt install keychain
) and add the following at the bottom of ~/.zshrc
:
# keychain for Ubuntu
eval `keychain --eval --quiet --agents ssh id_rsa`
PyTorch comes packaged with its own CUDA runtime, so you typically don't need to install a separate system-wide CUDA. However, some libraries (e.g. pytorch-geometric) may require a system-wide CUDA installation. You can install CUDA 11.5 by following the commands below:
# Check if nouveau is running
lsmod | grep nou
# If running, disable Nouveau driver
sudo bash -c "echo blacklist nouveau > /etc/modprobe.d/blacklist-nvidia-nouveau.conf"
sudo bash -c "echo options nouveau modeset=0 >> /etc/modprobe.d/blacklist-nvidia-nouveau.conf"
sudo update-initramfs -u
sudo reboot
# You may need to remove the Nvidia drivers installed by the package manager
sudo apt remove --purge '^nvidia-.*'
sudo apt autoremove
sudo reboot
# Install latest CUDA by following the instructions on https://developer.nvidia.com/cuda-downloads
# Remove old installations (if at all) by running one of the commands below (whatever is available)
sudo /usr/local/cuda-x.x/bin/uninstall_cuda_x.x.pl
sudo /usr/local/cuda-x.x/bin/cuda-uninstaller
You may have to add the following to your ~/.zshrc
:
# Add CUDA paths
export PATH=$PATH:/usr/local/cuda/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib64
By default, poetry
is installed in $HOME/.local/bin
, so it's a good idea to add the following to your ~/.zshrc
:
# Add ~/.local/bin (mostly for Poetry)
export PATH=$PATH:$HOME/.local/bin
The path for .NET global tools is not automatically added, so you may have to add the following to your ~/.zshrc
:
# Add ~/.dotnet/tools for dotnet tools
export PATH=$PATH:$HOME/.dotnet/tools