I know! This is completely out of the blue. But I did something this morning that I rather like. I thought you, dear reader, might like it.
I like splitting my terminal panes. It just saves having another tab in my task bar. I like having a terminal where I’m debugging on a remote server, another terminal for testing network connectivity and maybe even another where I’m checking my local build environment. The point is, I like having these panes within my terminal where I can maintain a particular work flow
If you have no idea why, or what I@m talking about, imagine your reading three really interesting books. You want to keep all three books open at the same and retain contextual awareness of every book. That’s basically waht I’m doing here.
Anyway. let’s get to it.
|
1 2 3 4 5 6 7 8 9 |
Function set-PowerShellTitle { param( [Parameter(Mandatory=$true)] [ValidateSet("Top", "Bottom", "Left", "Right")] [string]$Position ) $Host.UI.RawUI.WindowTitle = "PowerShell $Position" } |
Put that into your $profile
Within the terminal, just type this:
code $profile
Add it to the bottom, press control and s and close the file.
Now, let’s modify your terminal settings.
Within the terminal, press control and comma (,)
Tab to Open Settings JSON
Now find the text that starts with actions [
Put a new line after the [ and paste this:
|
1 |
Now find the section beginning with “KeyBindings”:
again, after the [ paste this:
|
1 2 3 4 5 6 7 8 9 |
{ "command": { "action": "splitPane", "commandline": "pwsh.exe -NoExit -Command \"set-PowerShellTitle -Position Bottom\"", "split": "down" }, "id": "User.splitPane.76F828C8" }, |
|
1 2 3 4 |
|
1 2 3 4 5 6 7 8 |
{ "id": "User.splitPane.76F828C8", "keys": "alt+shift+minus" }, You are done! replicate that for split left, right etc. Any questions... big ones, small ones, important ones, unimportant ones....... Ask someone else. Thanks |

0 Comments