This is my window Terminal setup. I did this to save time setting up the Terminal on a new computer and hope it will be helpful to you. You don't have to adjust all of these. Adapt to your work style.
- Version record
- See how to run Linux on Windows Terminal here.
- Inspiration, list of modules and solution from craftzdog/dotfiles-public.
- Windows 10, 11
- Tab to get command, directory or option suggestion
- Right arrow to get command suggestion
- Directory jumper
- Search file
- Search command
- Useful shortcuts command
First, I have to install Nerd Fonts so that I can display the icons and markers used in programming nicely.
So I use Caskaydia Cove Nerd Font.
And you can see more fonts to get the one that is right for you here.
- Open Terminal.
- Open Settings JSON file defualt (Ctrl - Shift - ,).
- In ["profiles"]["defaults"] setting JSON file, if your theme is dark replace it with these
{
"colorScheme": "One Half Dark", "cursorShape": "vintage",
"experimental.retroTerminalEffect": false,
"font":
{
"face": "CaskaydiaCove NF"
},
"opacity": 75,
"useAcrylic": true
},
, but if your theme is light replace it with this
{
"colorScheme": "One Half Light", "cursorShape": "vintage",
"experimental.retroTerminalEffect": false,
"font":
{
"face": "CaskaydiaCove NF"
},
"opacity": 75,
"useAcrylic": true
},
Note
Don't forget to change font face to your font.
- In ["actions"] setting JSON file replace it with this
[
{
"command":
{
"action": "switchToTab",
"index": 4
},
"keys": "ctrl+shift+5"
},
{
"command":
{
"action": "switchToTab",
"index": 0
},
"keys": "ctrl+shift+1"
},
{
"command":
{
"action": "newTab",
"index": 2
},
"keys": "ctrl+alt+3"
},
{
"command":
{
"action": "switchToTab",
"index": 7
},
"keys": "ctrl+shift+8"
},
{
"command":
{
"action": "prevTab"
},
"keys": "alt+h"
},
{
"command":
{
"action": "copy",
"singleLine": false
}
},
{
"command": "paste"
},
{
"command": "find",
"keys": "ctrl+shift+f"
},
{
"command": "unbound",
"keys": "ctrl+v"
},
{
"command": "unbound",
"keys": "ctrl+insert"
},
{
"command": "unbound",
"keys": "ctrl+c"
},
{
"command": "unbound",
"keys": "ctrl+numpad_minus"
},
{
"command": "unbound",
"keys": "alt+shift+d"
},
{
"command": "unbound",
"keys": "ctrl+numpad_plus"
},
{
"command": "unbound",
"keys": "ctrl+plus"
},
{
"command": "unbound",
"keys": "alt+down"
},
{
"command": "unbound",
"keys": "alt+left"
},
{
"command": "unbound",
"keys": "alt+right"
},
{
"command": "unbound",
"keys": "ctrl+alt+left"
},
{
"command": "unbound",
"keys": "alt+up"
},
{
"command": "unbound",
"keys": "shift+insert"
},
{
"command": "unbound",
"keys": "alt+shift+plus"
},
{
"command": "unbound",
"keys": "alt+shift+minus"
},
{
"command": "unbound",
"keys": "win+sc(41)"
},
{
"command": "unbound",
"keys": "alt+shift+up"
},
{
"command": "unbound",
"keys": "alt+shift+right"
},
{
"command": "unbound",
"keys": "alt+shift+left"
},
{
"command": "unbound",
"keys": "alt+shift+down"
},
{
"command": "unbound",
"keys": "ctrl+numpad0"
},
{
"command": "unbound",
"keys": "ctrl+0"
},
{
"command": "unbound",
"keys": "ctrl+shift+tab"
},
{
"command": "unbound",
"keys": "ctrl+tab"
},
{
"command": "unbound",
"keys": "ctrl+shift+vk(255)"
},
{
"command": "unbound",
"keys": "ctrl+1"
},
{
"command":
{
"action": "switchToTab",
"index": 2
},
"keys": "ctrl+shift+3"
},
{
"command":
{
"action": "switchToTab",
"index": 3
},
"keys": "ctrl+shift+4"
},
{
"command":
{
"action": "switchToTab",
"index": 4294967295
},
"keys": "ctrl+shift+9"
},
{
"command":
{
"action": "splitPane",
"split": "auto",
"splitMode": "duplicate"
}
},
{
"command":
{
"action": "switchToTab",
"index": 1
},
"keys": "ctrl+shift+2"
},
{
"command":
{
"action": "newTab",
"index": 1
},
"keys": "ctrl+alt+2"
},
{
"command":
{
"action": "switchToTab",
"index": 5
},
"keys": "ctrl+shift+6"
},
{
"command":
{
"action": "nextTab"
},
"keys": "alt+l"
},
{
"command":
{
"action": "newTab",
"index": 0
},
"keys": "ctrl+alt+1"
},
{
"command":
{
"action": "switchToTab",
"index": 6
},
"keys": "ctrl+shift+7"
},
{
"command":
{
"action": "newTab",
"index": 3
},
"keys": "ctrl+alt+4"
},
{
"command":
{
"action": "newTab",
"index": 4
},
"keys": "ctrl+alt+5"
},
{
"command":
{
"action": "newTab",
"index": 5
},
"keys": "ctrl+alt+6"
},
{
"command":
{
"action": "newTab",
"index": 6
},
"keys": "ctrl+alt+7"
},
{
"command":
{
"action": "newTab",
"index": 7
},
"keys": "ctrl+alt+8"
},
{
"command":
{
"action": "newTab",
"index": 8
},
"keys": "ctrl+alt+9"
}
],
Align of the shell's index
You can align the shell's index for for ease of pressing "ctrl+alt+(index)" by Press "Open JSON file" button at pane to open file. Then, go to settings.json.profiles.list to edipress "Open JSON file" button at pane to open file. Then, go to settings.json.profiles.list to aligh them.
Shortcuts
You can see what each shortcut run what command in Setting in "Actions" pane.
-
In (Settings) tab of Windows Terminal, in "Appearance" pane, set "Use acrylic material in the tab row (requires relaunch)" to "On".
-
Relaunch Windows Terminal.
Type these command in your terminal
Note
If problem about administrator permission occured, type "sudo" in front of that command.
- Install Scoop.
iwr -useb get.scoop.sh | iex
scoop install curl sudo jq
- Install Git
winget install -e --id Git.Git
- Install Neovim
scoop install neovim gcc
- Install Oh My Posh
winget install --id XP8K0HKJFRXGCK
- Install Terminal-Icons
Install-Module -Name Terminal-Icons -Repository PSGallery
- Install Z
Install-Module -Name z -Force
- Install PSReadLine
Install-Module -Name PSReadLine -AllowPrerelease -Scope CurrentUser -Force -SkipPublisherCheck
- Install PSFzf
scoop install fzf
Install-Module -Name PSFzf -Scope CurrentUser -Force
- Type this command in your terminal.
cd (your\document\path)
mkdir PowerShell
New-Item -Path $PROFILE.CurrentUserCurrentHost -ItemType File
start $PROFILE.CurrentUserCurrentHost
- Relaunch Windows Terminal.
And copy data from this file to your terminal and save.
- Type some command.
- Press "Tab" to get suggestion.
- Type followed by suggestion then, press "Tab" again.
- Type some command.
- If it show suggestion of command at right of cursor, press "Right" key, if you want to get that command.
- Type
z
and followed by all directory path or some part of directory path
You can also jump over directory.
- Search file by press "Ctrl-F".
- Type directory or file name and choose command by press "Up" and "Down" key.
- Press "Enter" to select command or press "Esc" to cancel.
- Search command by press "Ctrl-R"
- Type command that you want to use that you've used before and choose command by press "Up" and "Down"
- Press "Enter" to select command or press "Esc" to cancel.
- Vim - nvim
- ll - list files and folders in current directory
- grep - find string
- cls and clr - clear screen
Tips
You can add or edit alias at $PROFILE.CurrentUserCurrentHost directory from this command
Set-Alias <shortcut command> <full command>
.