Archive for February, 2021


Microsoft Terminal

This is another relatively new open source tool from Microsoft. I absolutely love it and can’t work without it. It is not exactly a terminal but provides tabs to open different terminals installed on Windows. It supports Windows console, PowerShell, all installed distributions in WSL, and Azure in a single window. If you work with embedded systems, use multiple build servers, or multiple remote machines this is a must to have tool.

This is how the Microsoft Terminal looks likes:

Customizing Profiles

Microsoft terminal has concept of profiles corresponding to each type of console it can open. By default it will detect and enable all detected consoles: Windows command prompt, PowerShell, Azure Cloud Shell, and all WSL distributions. If you don’t need to use a console, then it is possible to hide them from the Settings JSON by toggling the hidden key to false. It is also possible to change the name terminal shows in the tab list. The full set of settings provided for profiles are available at https://aka.ms/terminal-profile-settings.

Color Schemes

Microsoft terminal offers some color schemes out of the box and it is possible to create our own or customize an existing scheme by editing the JSON file. The documentation for color schemes is located at https://aka.ms/terminal-color-schemes. I am happy with the default color scheme but if you like to change, there are tons of color schemes available from https://windowsterminalthemes.dev.

Keyboard Shortcuts

Working with terminal is pretty useless without using keyboard short cuts and Microsoft terminal allows to bind keyboard shortcuts for almost all tasks. The full documentation is located at https://aka.ms/terminal-keybindings. The keyboard shortcuts are called actions and there are two types: without arguments and with arguments. Some of the important short cuts that I use are:

        { "command": { "action": "splitPane", "split": "auto", "splitMode": "duplicate" }, "keys": "alt+shift+d" },
        
        { "command": "commandPalette", "keys": "ctrl+shift+p" },
        { "command": "toggleFullscreen", "keys": "ctrl+enter" },
        { "command": "openNewTabDropdown", "keys": "ctrl+space" },
        { "command": "openSettings", "keys": "ctrl+," },
        
        { "command": "duplicateTab", "keys": "ctrl+shift+d" },
        
        { "command": "closePane", "keys": "ctrl+w" },
        { "command": { "action": "moveFocus", "direction": "down" }, "keys": "alt+down" },
        { "command": { "action": "moveFocus", "direction": "left" }, "keys": "alt+left" },
        { "command": { "action": "moveFocus", "direction": "right" }, "keys": "alt+right" },
        { "command": { "action": "moveFocus", "direction": "up" }, "keys": "alt+up" },
        { "command": { "action": "moveFocus", "direction": "previous" }, "keys": "ctrl+alt+left" }

The most interesting of these shortcuts is the command palette. It can be launched from the default key bindings of Control + Shift + P. It can search and execute any command available in the terminal.