Is it possible to move single open file between panes in VS Code? - editor

I want to have the openned in VSCode file moved from one pane to another. Just like in Sublime ctrl+shift+1 / ctrl+shift+2. What command is in charge of this?
split editor vertically (the second pane is empty), I do this by workbench.action.editoLayoutTwoColumns
move current open file from the first pane to the second

Open the command palette and search for View: Move Editor into to bring up related commands. In this case, you might be specifically looking for the following:
Command
Move Editor into Next Group
Shortcuts
Mac: ctrl+cmd+right
Windows/Linux: ctrl+alt+right).

Related

Displaying folder tabs in sublime

I find myself in a situation, where I need to open 4+ project folders and edit various files on all of them back and forth. I find it a tad bit annoying, when I have minimized them and hovering on taskbar shows me 4 of them and I keep mixing them up, which I want to edit.
Is there a plugin or way or a different editor all together, that will display my opened folders in sublime, just like it basically shows opened files?
I'm not sure about sublime ( but in eclipse/aptana or intellij/phpstorm, I do switches on projects). Because the way sublime works, it shows you by default one project folder per one sublime running. You can try this:
Open your 1st folder with sublime. Drag the 2nd folder onto sublime's sidebar. Do the rest of the folders same way.
For taskbar issue, you can try Taskbar properties>'Never combine' and just Alt Tabbing/Alt+shift Tabbing them...

How to restore/clear form position after multi-monitor setup change

Within the IDE, when F12 toggles between code and form,
the forms are displayed outside the monitor borders,
and therefore not visible.
This happens after a multi monitor setup has changed,
and the forms no longer open within the available new monitor screen areas.
One way to resolve this is to use the property inspector and
set the Top/Left properties to 4 to make the forms visible.
This is however a lot of work,
especially if many forms and possibly many projects are involved.
Is there a better way to reset the form locations once and for all,
so they are all visible with the new monitor setup?
There is nothing (AFAIK) in Delphi 6 IDE that would help. But assuming you are using Windows, the help is near, (tested on Windows 7):
Right-click on taskbar and select 'Cascade windows', this affects all windows in one go.
or
Alt-Tab to the window, press Alt-Space and then M (for move). Move the window with the arrow keys. This you would have to do seperately for each window.
Close your Delphi IDE. Then, if your current project group file is xyz.groupproj, open the file xyz.dsk with an text editor. Look for section [UndockedDesigner] entry "Count" and change its value to zero.
[UndockedDesigner]
Count=0
That will force all design window positions to 0,0 on your main monitor.

Aligning left and right on the same line in WordPad

Is it possible to align texts left and right on the same line in WordPad? For example, I want my name to the left and the date to the right. Both on the same line. How can I do this?
While WordPad does not allow you to modify the alignment of tab stops the RTF format supports tab stops with alignments and WordPad can display and edit documents containing such tab stops, for example when you create them in Microsoft Word and save as RTF.
If you don't have access to Microsoft Word you can create the tab stops in WordPad, save the file as RTF, then open it with a text editor and modify the tab stop definitions you are interested in.
Here is an example:
I created a simple RTF document in WordPad which contains the text Left<tab>Middle<tab>Right and created two tab stops. I want the first tab stop to align centered and the second tab stop to align right.
Then I save the document in RTF format on my desktop and open it in notepad. It looks like this:
{\rtf1\ansi\ansicpg1252\deff0\nouicompat\deflang1031{\fonttbl{\f0\fnil\fcharset0 Calibri;}}
{\*\generator Riched20 10.0.14393}\viewkind4\uc1
\pard\sa200\sl276\slmult1\tx3976\tx7242\f0\fs22\lang7 Left\tab Middle\tab Right\par
}
Notice the \tx3976 and \tx7242 commands which define the tab stop positions (generally you look for \tx followed by some number).
Now you can insert the \tqc command for center-aligned tabstops or the \tqr command for right-aligned tabstops. You enter that command in front of the \tx command you want to modify. The RTF document now looks like this:
{\rtf1\ansi\ansicpg1252\deff0\nouicompat\deflang1031{\fonttbl{\f0\fnil\fcharset0 Calibri;}}
{\*\generator Riched20 10.0.14393}\viewkind4\uc1
\pard\sa200\sl276\slmult1\tqc\tx3976\tqr\tx7242\f0\fs22\lang7 Left\tab Middle\tab Right\par
}
Now you can save the document and exit notepad, when you reopen the file in WordPad you should see it displaying with the correct tab stop alignments. It is also possible to move the tab stops around in WordPad without losing the alignments.
Tested on Windows 10 but it probably will work on earlier versions of WordPad since the required commands are not exactly new.
It's not possible using proper formatting.
For example, in Microsoft Word/LibreOffice Writer you'd use left- and right-aligning tabs, as demonstrated in this howto for Word. However, WordPad only has left-aligning tabs.
It is possible to fake it, as it was done in the old days (and still now, by those who don't know better), by clever usage of spaces (or a mix of spaces and tab stops).

Eclipse - preview source in separate window on mouse click?

I'm looking for a way to be able to preview code related to what's under my cursor in a separate window when I click the mouse/touchpad. Eg. definition for methods / member variables etc.
Something like the results of Ctrl+Click but instead of opening the file in my main editor window, I'd like to see the results in a small window below the main editor window (a 'code preview' window).
Ideally, the 'code preview' window doesn't hide any code surrounding the preview of the item under the cursor.
This happens for eg. in Source Insight & VSlick. It gives the ability to browse another section of the code in a small window while the main source is open in the main window.
I find it very useful.
Is there any way / plugin etc to do this in ADT/Eclipse ?
I'm new to Eclipse and using the ADT flavor (Eclipse Platform 4.2.1.v20130118) for Android Java dev.
Thanks!
Press Shift and hover the mouse cursor over the method or variable - it will show a small popup with the source preview.
You must be sure it is enabled in Preferences (Preferences->Java->Editor->Hovers, "Source" line should be checked).
Checked with Eclipse 4.4.

Adding "Paste" to the Shell Context Menu

I am using this routine to pop up the Shell Context Menu for a file name which is working well, except for one thing.
How to pop-up the Windows context menu for a given file using Delphi?
When I click "Copy" the menu closes as expected. If I move to another Folder or stay in the same one, when I right-click again for the Context Menu, it has no "Paste" option. Not even a grayed out one. I checked on the Poster's blog as mentioned in his Edit at the bottom, but that new routine crashes with Incorrect Parameter.
Can someone please assist with adding "Paste" to the original routine in the above link
Thanks
Look for TClipboard (library/uses ClipBrd). Using this you can manage a cliboard on Delphi.
More information: Basic CLipboard Operations
Obs.: You can use "Actions" too, depending your needs. See ActionManager component, and Action properties of your popupmenu.

Resources