✨ A guideline for configuring lots of tools to build your whole development environment on windows, such as desktop, terminal, shell and editor.
📄中文文档
-
Install TranslucentTB : A lightweight utility that makes the Windows taskbar transparent.
-
Install PowerToys : A set of utilities for power users to tune and streamline their Windows experience for greater productivity.
-
Install Snipaste : Offers powerful yet easy-to-use snipping, pasting and image annotating functionalities.
-
Install Captura : Capture screen, audio, cursor, mouse clicks and keystrokes.
-
Install dual-key-remap : Remap CapsLock to Escape when pressed alone and Ctrl when pressed with other keys. Don't forget to enable administrator access or else it doesn't work on administrator applications.
-
Install a nerd font : A patched font within high number of icons. I've merged two font families into one called NerdCodePro, so font engines will use different font on regular and italic style.
-
Install a cursor theme you'd like.
-
Press
Win
+I
and check if there are any settings that need to be changed.
Shortcut | Descript |
---|---|
Win +E |
Explorer |
Win +{num} |
Launch app on taskbar |
Win +Up |
Maximize window |
Win +Down |
Minimize window |
Win +Left |
Snap window left |
Win +Right |
Snap window right |
Alt +Tab |
Switch window |
Alt +F4 |
Close window |
Win +D |
Show/Hide desktop |
Win +, |
Peek desktop |
Win +L |
Lock desktop |
Win +; |
Emoji |
Alt +Space |
Search somthing (PowerToys Run) |
-
Install Windows Terminal
-
Configure Windows Terminal by pressing
Ctrl
+Shift
+,
in terminal window, you could refer to my settings.json.
Tips:
- All colorschemes are adjusted to fit both light and dark theme of system.
- The font is set to NerdCodePro that mentioned above, change it if you don't want to use it.
Shortcut | Description |
---|---|
Win +` |
Toggle quake (dropdown) window |
Ctrl +Shift +{num} |
New tab with profile {num} |
Ctrl +Shift +D |
Duplication current tab |
Ctrl +Shift +W |
Close tab |
Alt +Shift +S |
Horizontally split the pane |
Alt +Shift +V |
Vertically split the pane |
Alt +Left |
Move focus left |
Alt +Right |
Move focus right |
Alt +Up |
Move focus up |
Alt +Down |
Move focus down |
MouseSelect |
Copy |
Shift +MouseSelect |
Incremental Copy |
Alt +MouseSelect |
Copy block area |
Ctrl +Shift +V |
Paste |
Ctrl +Shift +F |
Search |
-
Install PowerShell
-
Install Scoop: A package manager to install apps in command line.
-
Install the required tools via scoop
# required scoop install 7zip git # aria2 # optional but recommended scoop install cht gdu tokei lazygit btop everything sysinternals cp .\bat\config ~\AppData\Roaming\bat\config cp .\lazygit\config.yml ~\AppData\Local\lazygit\config.yml cp .\everything\Everything.ini ~\AppData\Roaming\Everything\Everything.ini .\sysinternals\ProcessExplorerColumnSet.reg # Adding %USERPROFILE%\scoop\apps\git\current\user\bin to PATH is useful # To add 7zip and everything to explorer context menu, open app window and click the menu Tools > Options # To add `open with neovim in terminal`, refer to ./nvim/install-context.reg
-
Insall PowerShell modules
scoop install oh-my-posh zoxide lsd bat ripgrep fd fzf Install-Module posh-git Install-Module PSFzf
-
Configure PowerShell by executing
notepad $PROFILE
in PowerShell command line, you could refer to my profile.ps1 -
Copy the theme file base16_bear.omp.json into
%USERPROFILE%\Documents\PowerShell
-
Configure
%USERPROFILE%\.gitconfig
[user] name = Your Name email = username@email.com [core] editor = nvim [diff] tool = nvimdiff
-
Configure
%USERPROFILE%\.ssh\config
, thus you can push and pull from github via ssh with urlgit@github.com:user/repo
. Of course, you need to add your own ssh public key to github firstHost github.com Hostname ssh.github.com Port 443 User git IdentitiesOnly yes IdentityFile ~/.ssh/key.pem
-
You could find the document for wsl configuration section at here, the dotfiles in wsl/linux is still in the repo.
Shortcut | Description |
---|---|
Esc |
Vi mode, v in vi mode means open $EDITOR to edit command |
Ctrl +A |
Move to the start of the line |
Ctrl +E |
Move to the end of the line |
Ctrl +H |
Delete character left |
Ctrl +W |
Delete word left |
Ctrl +U |
Delete all left |
Ctrl +K |
Delete all right |
Ctrl +Z |
Undo |
Ctrl +Y |
Redo |
Tab |
Complete command or arguments |
Ctrl +P |
Previous command history with current prefix |
Ctrl +N |
Next command history with current prefix |
Ctrl +R |
Fuzzy search command history |
Alt +A |
Fuzzy search command argument history |
Ctrl +T |
Fuzzy search files in current directory |
Alt +C |
Fuzzy search directories in current directory |
Utils | Description |
---|---|
l /tree |
List files |
z /zi |
Change directory by path or keyword |
bat |
Print file content with highlight |
head |
Print only the first few lines |
tail |
Print only the last few lines |
sed |
Text raw filter |
cut |
Text column filter |
awk |
Text operator |
f |
Fuzzy search text of files in current directory an open $EDITOR |
gdu |
Disk usage analysis |
tokei |
Count code |
cht |
Search for a cheat sheet on cheat.sh |
proxy |
Show/Set/Enable/Disable proxy address |
Git Aliases | Git subcommand | Description |
---|---|---|
gst |
status |
Show all changes in workspace and index |
ga |
add |
Update changes from workspace to index |
gaa |
add |
Update all changes from workspace to index |
gau |
add |
Update all changes from workspace to index exclude untracked files |
gcln |
clean |
Clean all untracked files |
grs |
restore |
Restore workspace from index (default) or a commit |
gstl |
stash |
Show stashes |
gsta |
stash |
Stash all changes in workspace and index |
gstp |
stash |
Restore the changes from stash and delete it (default last) |
gstaa |
stash |
Restore the changes from stash (default last) |
gstd |
stash |
Delete stash (default last) |
gc |
commit |
Add a new commit from index |
gc! |
commit |
Add a new commit base on grandparent commit and move HEAD to it (like overwrite but keep history commit) |
glg |
log |
Show commit and its ancestry, revision form like HEAD^ |
grlg |
reflog |
Show commits of HEAD history, revision form like @{1} |
gd |
diff |
Show changes (default between workspace and index) |
gdt |
difftool |
Show changes (default between workspace and index) by nvim |
gmt |
mergetool |
Resolve conflicts by nvim , or you can use gco --ours or gco --theirs |
gm |
merge |
Merge a commit to HEAD, and do not allow fast forward |
gmc |
merge |
Continue merge |
gms |
merge |
Skip current patch and continue merge |
gma |
merge |
Abort merge |
grb |
rebase |
Rebase HEAD (default) or commit onto a commit |
grbc |
rebase |
Continue rebase |
grbs |
rebase |
Skip current patch and continue rebase |
grba |
rebase |
Abort rebase |
gcp |
cherry-pick |
Apply change in a commit to HEAD |
gcpc |
cherry-pick |
Continue cherry pick |
gcps |
cherry-pick |
Skip current patch and continue cherry pick |
gcpa |
cherry-pick |
Abort cherry pick |
grv |
revert |
Revert a commit to HEAD |
grvc |
revert |
Continue revert |
grvs |
revert |
Skip current patch and continue revert |
grva |
revert |
Abort revert |
grh |
reset |
Reset HEAD to a commit and keep all the changes in workspace and index |
grhh |
reset |
Reset HEAD to a commit and do not keep the changes |
gbl |
branch |
Show branches |
gb |
branch |
Add new branch at HEAD (default) or commit |
gcb |
checkout |
Add new branch at HEAD (default) or commit and checkout it |
gcb! |
checkout |
Add new branch at HEAD (default) or commit (overwrite exist) and checkout it |
gbu |
branch |
Set upstream of HEAD |
gbrn |
branch |
Rename branch at HEAD (default) or commit |
gbrn! |
branch |
Rename branch at HEAD (default) or commit (overwrite exist) |
gbd |
branch |
Delete merged branch |
gbd! |
branch |
Delete branch even if not merged |
gco |
checkout |
Checkout target commit |
gcor |
checkout |
Checkout target commit recursively |
gr |
remote |
Remote |
grl |
remote |
List remotes |
gra |
remote |
Add remote |
grrn |
remote |
Rename remote |
gru |
remote |
Set thr url of remote |
grd |
remote |
Delete remote |
gf |
fetch |
Fetch remotes |
gl |
pull |
Pull remotes and rebase, and automatically stash push and pop before and after |
gp |
push |
Push a ref to remote |
gp! |
push |
Push a ref to remote (--force-with-lease ) |
gp!! |
push |
Push a ref to remote (--force ) |
gcl |
clone |
Clone remote |
gclr |
clone |
Clone remote recursively |
gsa |
submodule |
Add a submodule |
gsu |
submodule |
Init and update submodules to expected version. To modify submodule, |
gsd |
submodule |
Delete a submodule |
lg |
Open Lazygit | |
gig |
Create a .gitignore template for you, .e.g gig c++ windows |
Tips:
- You don't need to remenber all the git aliases, use your favorite git UI tool instead, such as lazygit, fork or gitkraken. The git aliases list above is just to tell you the basic git operations you should know.
- Highly recommended for this blog post about git flow.
-
Install C/C++ compiler
scoop install mingw-mstorsjo-llvm-ucrt cmake
-
Install Neovim
scoop install neovim
-
Configure Neovim
# required Move-Item $env:LOCALAPPDATA\nvim $env:LOCALAPPDATA\nvim.bak # optional but recommended Move-Item $env:LOCALAPPDATA\nvim-data $env:LOCALAPPDATA\nvim-data.bak # clone git clone https://github.com/mrbeardad/nvim $env:LOCALAPPDATA\nvim # start and install plugins nvim
-
Install VSCode
-
Configure VSCode
- This is my settings.json and keybindings.json, you could copy them to
%APPDATA%\Code\User
optionally - This is my lastSyncextensions.json, you could copy it to
%APPDATA%\Code\User\sync\extensions\
- This is my settings.json and keybindings.json, you could copy them to
-
For more detail about configuration and usage of vscode and neovim, refer to mrbeardad/nvim