Quake Mode Console for Visual Studio - Open a Command Prompt with a hotkey
Back in March of 2013 when Phil Haack was deep into GitHub for Windows development we were going back and forth in email about how to quickly get into a shell from a specific project. I hate always having to paste in a "CD somedirectory" so I usually use some kind of "Command Prompt Here" right click menu.
TIP: A lot of people don't realize that you can Shift-Right-Click on a folder in Windows Explorer and you'll automatically get a "Command Prompt Here" menu item!
Anyway, Phil and I were emailing and he said (remember that GitHub for Windows (GHfW) was in development)...and I've always loved how the Quake console pops up when you press ~ in Quake.
I feel ashamed I didn't know this, but I just discovered that CTRL+ALT+D brings up the shell when in GHfW. We are considering ways to make our keyboard shortcuts more discoverable. Kind of like the `?` support we have on GitHub.com. We should totally make that a ~ shouldn't we? Like in Quake, Doom, etc.
And they did. When you're in GitHub for Windows just press ~ and you'll automatically get a new command prompt (or Bash Shell or PowerShell) and be dropped in to the current folder's directory. It's my most favorite feature about GitHub for Windows.
I mentioned this to Mads Kristensen yesterday and said we should build this feature into Visual Studio. Rather than waiting, he just created a little single purpose extension called Open Command Line. It works in Visual Studio 2012, 2013, and 2015.
But it's the hotkeys that make it awesome. Now I'm not sure how I lived without it. Alt-Space and it opens up a prompt right where I need it. Go download the Open Command Line free Visual Studio extension now, and remember, it works in Visual Studio Community which is also free! You can set it to open CMD, PowerShell, or a custom prompt.
Oh, by the way, the overlay there that shows what hotkey I'm using, that's Carnac.
Related Links
- Awesome Visual Studio Command Prompt and PowerShell icons with Overlays
- Introducing PowerShell Prompt Here
- Visual Studio Command Prompt Here and Search Unknown File Extensions
- Windows 10 gets a fresh command prompt and lots of hotkeys
- Console2 - A Better Windows Command Prompt
- ConEmu - The Windows Terminal/Console/Prompt we've been waiting for?
- Making a better, somewhat prettier, but definitely more functional Windows Command Line
Sponsor: Big thanks to the folks at Infragistics for sponsoring the feed this week! Responsive web design on any browser, any platform and any device with Infragistics jQuery/HTML5 Controls. Get super-charged performance with the world’s fastest HTML5 Grid - Download for free now!
About Scott
Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.
About Newsletter
-totally not Phil Haack. Unbiased observer.
So, would this open a cmd prompt, or can it be configured to open a PoSh-prompt?
When you're in GitHub for Windows just press ~ and you'll automatically get a new command prompt
It doesn't work on a French keyboard (AZERTY). On those keyboards the upper-left key is '²' (not sure why someone thought we needed this character directly accessible). The '~' character is accessible through AltGr+2, but since it's a dead char, it doesn't work as a shortcut key...
~ in Quake
Alt+Space in VS
F12 in IE and Chrome
Life would be easier if all of them could agree to use a standard shortcut.
You can see how to activate this mode here: http://tech.pro/blog/1239/conemu-quake-style-consoles
VS2013
Count me among them. Thank you so much.
(Not a great fan of non-discoverable features)
/cmd {PowerShell}to the ConEmu64.exe. Then, within that task, have command simliar to
powershell.exe -Command "& %ConEmuBaseDir%"and you should get your PowerShell process set to the correct directory.
2. With which tool did you make the animated gif?
Thank you
Awesome tip ;)
On my Mac I use TotalTerminal to get the same effect.
I wish it were easy to get the same thing in Windows.
Am I the only one that regularly uses:
Alt+Space, x - Maximize window
Alt+Space, n - Minimize window
Alt+Space, r - "Restore" (Unmaximize) window
Alt+Space, m - Move window (For when the window somehow gets stuck offscreen and can't be reached with the mouse, and needs to be rescued using the keyboard.
https://visualstudiogallery.msdn.microsoft.com/48c3e91e-d1d7-4bf9-84dd-d3b97e2d5922?SRC=VSIDE
Seems to do the trick!
It's a nice re-packaging of ConEmu, Clink and MsysGit and it can be easily configured to be a Quake style console. It has themes and uses Monokai by default so it looks pretty(ish) from the start.
But, I can't use with Visual Studio Express 2013 to Web. I cried!
Also you can install it using Chocolatey cinst stexbar or choco install stexbar
But you know what would be even better - is have Console support in a window like WebStorm does. While it seems like a little thing, having the command window right within the IDE and maybe active in a side panel is really nice instead of hunting around on the desktop through 20 windows to find the CLI...
Command: powershell.exe
Command Arguments (single line):
-ExecutionPolicy Bypass -NoExit -Command .(Resolve-Path "$env:LOCALAPPDATA\GitHub\shell.ps1"); .(Resolve-Path "$env:github_posh_git\profile.example.ps1")
Comments are closed.