Skip to content

mrbeardad/MyIDE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MyIDE

✨ A guideline for configuring lots of tools to build your whole development environment on windows, such as desktop, terminal, shell and editor.

lisence stars open_issues tag last_commit

📄中文文档


Desktop

desktop

Desktop Installation

  • 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.

Desktop Usage

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)

Terminal

desktop

Terminal Installation

  • Install Windows Terminal

  • Configure Windows Terminal by pressing Ctrl+Shift+, in terminal window, you could refer to my settings.json.

  • (Optional) Set Windows Terminal to high performance graphics usage.

Tips:

  1. All colorschemes are adjusted to fit both light and dark theme of system.
  2. The font is set to NerdCodePro that mentioned above, change it if you don't want to use it.

Terminal Usage

Shortcut Description
Win+` Toggle quake (dropdown) window
Ctrl+Shift+{num} New tab with profile {num}
Ctrl+Shift+D Duplication current tab
Ctrl+Shift+T New tab with btop
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

PowerShell

desktop

PowerShell Installation

  • Install PowerShell

  • Install Scoop: A package manager to install apps in command line.

  • Install the required tools via scoop

    scoop install 7zip git # aria2
    scoop install uutils-coreutils zoxide lsd bat sed gawk ripgrep fd fzf gdu tokei lazygit btop cht everything sysinternals
    # cp ./bat/config ~/AppData/Roaming/bat/config
    # cp ./lazygit/config.yml ~/AppData/Local/lazygit/config.yml
  • Insall PowerShell modules

    scoop install oh-my-posh
    Install-Module posh-git
    Install-Module PSFzf
  • Configure PowerShell $PROFILE by execute notepad $PROFILE in PowerShell command line, then overwrite the profile with the profile.ps1

  • Copy the prompt theme to %USERPROFILE%\Documents\PowerShell\base16_bear.omp.json

  • 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 url git@github.com:user/repo. Of course, you need to add your own ssh public key to github first

    Host 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.

PowerShell Usage

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
e Explorer
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
gi Create a .gitignore template for you, .e.g gi c++,windows

Tips:

  1. 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.
  2. You could use my config.yml if you choose lazygit, put it to %APPDATA%\lazygit\config.yml
  3. Highly recommended for this blog post about git flow.

VSCode-Neovim

neovim

  1. Install C/C++ compiler

    scoop install mingw-mstorsjo-llvm-ucrt cmake
  2. Install Neovim

    scoop install neovim
  3. 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
  4. Install VSCode

  5. Configure VSCode

    1. This is my settings.json and keybindings.json, you could copy them to %APPDATA%\Code\User optionally
    2. This is my lastSyncextensions.json, you could copy it to %APPDATA%\Code\User\sync\extensions\
  6. For more detail about configuration and usage of vscode and neovim, see mrbeardad/nvim