How to widen the terminal window in Cloud9 IDE? - view

Is there a layout in the Cloud9 IDE that will widen the terminal window to the full width of the browser? (similar to how Nitrous.io used to look, picture attached). Wondering if this is possible in the C9 settings.

If you click on the Workspace panel on the left side, you can hide your files, thus allowing the terminal to be nearly full screen. Otherwise, the terminal is confined to be nearly full-screen.

you can use the following init script to change the cloud9 layout
var layout = services.layout
var s = layout.getElement("searchRow")
var c = layout.getElement("consoleRow")
var cp = c.parentNode
var h = layout.getElement("hboxMain")
var hp = h.parentNode
cp.removeChild(c)
s.parentNode.removeChild(s)
cp.insertBefore(s, cp.firstChild)
hp.removeChild(h)
hp.appendChild(c)
c.insertBefore(h, c.firstChild)
use Cloud9>Open your init script menu item to edit it.
Then save and press ctrl-enter (cmd-enteron mac).

Related

Maximize terminal in VSCode when in side panel

In previous versions of VSCode there was an arrow icon at the top of the panel that could be used to maximize the panel, for instance the terminal. I do not know exactly in which version but that button is now gone and I'm unable to find an equivalent.
My question is: how can I maximize the terminal so it takes the whole VSCode window? Is there any way to get the button back?
Which version of VSCode are you using, and in which OS?
On Mac, and with 1.65.2 (the most recent update by now), I have it in the right corner, near the X button:
Shortcuts
Now talking about shortcuts to make your life easier, there are 2 you should be aware of.
PS: Remember that to change any shortcuts, just go over VSCode Command Palette and type Keyboard Shortcuts to change them.
Maximise panel size
There are no default shortcuts for those, in both Windows and Mac.
If you want to set any, the name of the shortcut is View: Toggle Maximized Panel:
Increasing / decreasing terminal size
Now talking shortcuts, if you want to resize your terminal window, in Mac there's a native shortcut that allows to increase / decrease terminal size with Cmd + Ctrl + Arrow Up / Arrow Down.
There's no default for Windows.
If you want to set / change those shortcuts, they are called Terminal: Resize Terminal Down and Terminal: Resize Terminal Up:
Terminal panel on the side
If you added your panel to either left or right, then the mark to make it fullscreen changes.
After clicking on the arrow below, it'll hide all your files and make the terminal to run in the whole screen for VSCode:
I also got the arrow disappeared, but i manage to bring it back by with command:workbench.action.alignPanelCenter
But i don't know i un align it in the first place
So maybe it will work with you
To get the maximize arrow on the left panel...
Left-click the bottom panel, then choose Move Panel Left
To get the maximize arrow on the bottom panel...
First, press the Customize Layout button
And select Center Panel Alignment
Then move the panel back to the bottom.
Panel can be maximized when centered.
Example: If panel is not centered and the Maximize button is missing you also cannot use the command by hitting
Shift-Ctrl-P View: Toggle Maximize Panel
Fix: run these commands (press Shift-Ctrl-P then begin typing)
First command will enable the maximize button
View: Set Panel alignment to Center
Second command will now work to Maximize (or just press the button that shows up now)
View: Toggle Maximize Panel
Blue and skube have the right answer to the original question. I cannot comment so summarize an answer using commands that can be pasted to verify.

Need a "one-click" webdev hotkey workflow solution

Question for all you webdev guys/gals who have found a minimal-hassle development environment.
OS: Win7
Editor: JEdit
Task: Previewing work in a web browser
I would like to program a single hotkey to pack the following series of hotkeys into one. I use this sequence many times a day to preview my work in a browser.
The key commands are:
(from JEdit) ctrl + e ctrl + s [save all files]
(win) alt + tab [switch me over to browser]
(browser) ctrl + r [reload page]
I have not used Dreamweaver or flash in years but I remember punching f12 or ctrl + enter and having a browser pull up previewing the current work file. I am looking for a similar workflow but I cannot simply link to the saved file on disk. I need to look at the file through a local webserver. Typically I just have the browser open to the page I need and refresh it when I need to preview what I have done.
Another issue is the alt+tab step is not explicit enough. Often times the browser is not correctly sequenced in the open apps list to get to it without multiple tabs.
Thanks for any suggestions, workflow tips, etc.
Use this answer to create a command line method of refreshing a webpage ( it will work for any browser).
Next, create a baseline macro in JEdit for activating that script that you created:
In JEdit, you can record macros with Macros->Record Macro.
Do ctrl + e + s
Stop recording the macro with Macros->Stop Recording.
Open the JEdit browser tab with the newly created macro buffer that is now open in JEdit and add a system call at the end of it to run your visual basic script for refreshing the browser tab:
Runtime.getRuntime().exec("c:/PATH/TO/VB_SCRIPT AND ARGS IF YOU NEED THEM");
Save the macro.
Create a JEdit keyboard shortcut with utilities->global options, select "Shortcuts" then search for you macro and create a new keyboard binding.
Note that the Java beanshell exec command is non-blocking, so if you want to do anything else after executing the command, you may have to insert a sleep like:
Thread.currentThread().sleep(2000);
Just Press Alt + F5 and get it done!
To accomplish that, install AutoHotKey and run the script below (copy in a text file and change extension to .ahk). There is a portable version here. It was tested with AutoHotKey version is 1.0.48.05
This solution is pretty flexible since you can change Keys, Editors, Browsers and everything else. It works with Firefox and IE but you can easily customize.
The varTextEditor and varBrowsers where discovered using "WindowSpy" utility that comes bundled into AutoHotKey.
;###############################################################################
; Save all unsaved documents, refresh all opened browsers and return to text editor
;###############################################################################
!F5::
;Configuration vars. Edit here the settings of this script
; jEdit Eclipse
varTextEditor = SunAwtFrame,SWT_Window0
;varBrowsers = MozillaUIWindowClass,MozillaWindowClass,Chrome_WidgetWin_0,IEFrame,OpWindow,{1C03B488-D53B-4a81-97F8-754559640193}
; Firefox3 Firefox4 Chrome IEca Opera Safari
varBrowsers = MozillaWindowClass,IEFrame
;End of configuration vars.
WinGetClass, thisWindowClass, A ;Get the active window class
if (InStr(varTextEditor, thisWindowClass, true, 1) > 0) { ;true = case sensitive
varTextEditorClass = ahk_class %thisWindowClass%
if (thisWindowClass = "SunAwtFrame") {
OutputDebug, ...Saving everything
; SetKeyDelay, 100, 100, Play
Send ^+s ;Ctrl + Shift + S = Save all
} else if (thisWindowClass = "SWT_Window0") {
SendPlay ^s ;Ctrl + S = Save
}
Sleep, 500 ;Give some time to the data be recorded on hard disk
} else {
MsgBox, 0, Ops!, You must be in on these text editors: (%varTextEditor%) to get this script running, 5
return
}
;Refresh all opened (and maximized) browsers
Loop, parse, varBrowsers, `,
{
varClasseBrowser = ahk_class %A_LoopField%
if WinExist(varClasseBrowser) {
WinGet, winState, MinMax, %varClasseBrowser% ;get window state. -1 = minimized
if (winState != -1) {
WinActivate, %varClasseBrowser%
OutputDebug, ...Refresh browser %A_LoopField%
Send, {F5}
}
}
}
;Return to text editor
WinActivate, %varTextEditorClass%
return

How to maximize command prompt in windows xp

I am on windows xp,
Is there any way to maximize my cmd.exe window?
I am doing some mysql and it is so difficult to read results of my queries in such a small window.
Why maximize does not really maximizes it?
Is there a way for maximizing?
Or maybe an alternative command prompt I can use?
thanks
Click on the top left icon in the window (the "C:\" one) and select "Properties".
Then select the "Layout" tab and change the window size to what you want it to be (I have 128x50 for the screen and 128x999 for the scroll buffer). You can also optionally set the top left position (I always have it at 1,1) if you don't want Windows itself deciding where the window goes.
When you click on OK, make sure you tell it to modify the shortcut that started the window.
Then it will remember.
This is for XP, other MS operating systems may vary slightly but the general idea should be the same.
Try this:
In the Command window, right click the Title
bar and select Properties from the
popup menu. The property sheet
appears.
In the property sheet, select 'Full
Screen' in the 'Display Options'
box.
Close the property sheet by clicking
OK and select 'Save proeprties for
future windows with same title'.
I would recommand that you use powershell
http://www.microsoft.com/windowsserver2003/technologies/management/powershell/download.mspx
It also support full screen mode, and some other nice feature.
Command Window Default Properties
Click on the sytem menu, or with focus set on the Command Windows, press Alt+Space, and select Properties. Change your Font, Window Size, and so on. I always change my Window Size (on the Layout tab) to Width 80 by Height 65 and Screen Buffer Size to 80 by 300.
Check out Console2, it seems to be about the most promising window enhancement for cmd.exe.
I have to say, cmd.exe is probably the worst part of windows! Especially the copy pasting support, etc.
Personally, I use putty to ssh into a Linux box when I really need to do command line work, you can't go past Bash.
Even though you could install that on windows using Cygwin, which will allow you to use another console, although this doesn't have the ability to override the windows cmd.exe, it might be worth a shot given that you are trying to use a command line application, and not windows :).
Access Properties by right clicking on top of the CMD window, go back to the Font tab, select either 10 x 18 or 12 x 16, and then click OK. You'll then need to go back to the Layout tab and reset the Screen Buffer Size Width to the appropriate value. For example, I selected the 10 x 18 font size and then changed the Screen Buffer Size Width to 160X300 and window size width to 134X37.

Visual Studio: How can I see the same file in two separate tab groups?

I want to be able to edit one method while looking at another method in the same file, as reference.
Can this be done?
You can open the file in another tab (Window -> New Window).
Doing so you have two copies of the same file. Then you can right-click the tab bar and select New Vertical Tab Group (or New Horizontal Tab Group, the one you like more).
Hope I understood you question..
Be on the tab you want to duplicate,then click in the menu bar at the top onWindow > New Window
Finally drag & drop the second window to the the left or right side to show both views next to each other.
Et voila, there you have it :)
EDIT
It seems that this function is not implemented in all version of VS.
In my case (V 15.4.2 (2017), V 15.9.7 (2017) & V 16.2.5 (2019)) it just works fine.
Only vertically that I'm aware. When looking at the code, right above the vertical scroll bar is a small rectangle, drag it down to get a split view of the file.
You simply use the small drag arrows icon at the top right corner of your file window as depicted in the following screenshots:
1) View the same document side-by-side (with a fix for Visual Studio 2017)
It is possible to do this using New Window and New Vertical Tab Group, however, in my Visual Studio 2017 the New Window command was missing from the Window menu. To use it, first you must add the command to a menu or assign a shortcut to it.
To add New Window to your Window menu follow this sequence, starting with the Tools menu:
Tools > Customize > Commands > Menu Bar > Window > Add Command > Window > New Window
FYI In the Commands step you decide where to put the New Window command. The sequence I gave above puts it unceremoniously at the top of the Window menu.
To view the same document side-by-side
Open the document you want to view side-by-side
Select your recently added New Window command (perhaps it's in Window > New Window)
Right click the new tab and select New Vertical Tab Group or select that command from the Window menu
2) View the same document above-one-another
If you wish to view the same document in two views on top of each other use the Window > Split command or click-and-drag the double-arrow at the top of the scroll bar for any window.
3) Get creative
FYI You can even combine the two view options to have three, four or even more views of the same document on a particularly wide monitor. On mine (2560 x 1080) I can comfortably get three side-by-side views going and split them vertically, if desired.
One can install VsVim extension and :sp :vsp does the trick.
In Visual Studio 15 you can just click inside the document and then "Window → Split"

Are there any better command prompts for Windows?

For some reason the Windows command prompt is "special" in that you have to go to a properties dialog to resize it horizontally rather than just dragging the corner of the window like every other app. Unsurprisingly this feature made it into P-P-P-Powershell as well -- is there any way around this via command prompt replacement or Windows hackery?
2019 Update:
Microsoft has released the terminal app on Github & the Windows Store, and it has tabs, panels, acrylic transparency, and other features.
2016 Update:
Windows 10's default conhost UI has more features, including free resize, transparency, etc (this includes cmd & powershell)
I now use ConEmu (walkthrough here) which has many features including tabs & split panes.
Other options include Cmder (which comes with additional tools built in), and ConsoleZ (a fork of Console2).
Console appears to no longer be updated
I don't know if this is what you want: Resizing the Powershell Console Window. If so, I got this awhile ago: Just type: resize and use the arrow keys to adjust width and height.
##
## Author : Roman Kuzmin
## Synopsis : Resize console window/buffer using arrow keys
##
function Size($w, $h)
{
New-Object System.Management.Automation.Host.Size($w, $h)
}
function resize()
{
Write-Host '[Arrows] resize [Esc] exit ...'
$ErrorActionPreference = 'SilentlyContinue'
for($ui = $Host.UI.RawUI;;) {
$b = $ui.BufferSize
$w = $ui.WindowSize
switch($ui.ReadKey(6).VirtualKeyCode) {
37 {
$w = Size ($w.width - 1) $w.height
$ui.WindowSize = $w
$ui.BufferSize = Size $w.width $b.height
break
}
39 {
$w = Size ($w.width + 1) $w.height
$ui.BufferSize = Size $w.width $b.height
$ui.WindowSize = $w
break
}
38 {
$ui.WindowSize = Size $w.width ($w.height - 1)
break
}
40 {
$w = Size $w.width ($w.height + 1)
if ($w.height -gt $b.height) {
$ui.BufferSize = Size $b.width $w.height
}
$ui.WindowSize = $w
break
}
27 {
return
}
}
}
}
If you don't mind installing cygwin you can use it with xterm or rxvt. You'll also be able to use Bash as the shell instead of cmd.exe which is much nicer.
This isn't quite what you're looking for, but the way I get around it is by using cygwin's rootless X-Windows mode and XTerms. I prefer the unix command line environment more then Windows' env, and the XTerm windows act just like any other window.
As for straight replacements, a quick google search shows these:
Console
econsole
I haven't tried them, so I'm not sure if they have what you're looking for, but they might be worth a shot.
PowerShell v2.0 ships with an interactive shell, called the PowerShell Integrated Script Environment (ISE). It's not fantastic, but it's usually better than the console subsystem.
Good
Includes a PowerShell script editor, with colorization
Colorization as a type at the prompt
I can have multiple PowerShell sessions, including remote sessions, as tabs.
The ISE is PowerShell-aware, so I can manipulate and extend it with PowerShell. For example, see the "IsePack", which adds a ton of features, including copy-as-HTML.
Can easily scale the text
Conventional Windows resizing, cursor navigation, selection, copy, paste, fonts, etc.
Bad
Interactive console applications block waiting for input, and thus hang.
Console applications that detect whether their standard IO are redirected will think that is so, and thus act oddly. The worst is TFS's tf.exe. For example, 'tf submit' will submit without prompting, even though the prompt is GUI, not CLI.
A limited feature set out of the box. It's obvious they would like to make a much richer PowerShell IDE but did not.
Way after the fact, but things have improved in the meantime. ConEmu is highly configurable, and can be resized horizontally and vertically. It has the somewhat odd (to me anyway) behavior of resizing the font as the window is resized. There's some discussion about it here. And Scott Hanselman has written about it, including integration with FarManager.
You might consider installing FAR. It's an excellent text mode file manager and much more. It could also be resized by dragging the corner of the window :)
If you set the property 'Layout/Screen Buffer Size/Width' then, when prompted, choose 'Modify shortcut that started this window' it will remember the buffer width. Then when you start another command prompt it will be, for example, the original 80 wide, but you can now stretch it to whatever you set the buffer width to.
Command Prompt will not wrap at the current window width, only at the buffer width. Thus if you've set the buffer width to 120, but the window is only 80 wide the lines will wrap at 120 and you'll have to scroll to read characters past 80.

Resources