TinyMCE (version 6) not preserving alignment on enter - tinymce

If you put the cursor after a center-aligned picture(the very first image in the editor) and press enter to go to a new line, it aligns to the left. I think the old editor (version 4) was used to preserve whatever alignment the previous line had when using enter.

Related

Set integrated terminal default position

By default when opening the integrated terminal, it opens horizontally to the bottom of the editor.
How can I change the default position of the integrated terminal so that it is vertically aligned to the right of the editor, like when clicking the "Move to right" button?
EDIT:
Looking to set this in the settings.json
Try adding "workbench.panel.defaultLocation": "right" to your User/Workspace Settings
In August 2021 using vscode 1.60.0 installed on Linux (Manjaro) from Snap, Select File>Preferences>Settings. Type 'terminal' in to the search and it is the first thing to appear 'Workbench>Panel>Default Location'. This contains a drop-down with left, right and bottom as options.
You can see the image it's easy.
And if you close the Visual Studio it open by default in the position that was.

Visual Studio Code: How to split the editor vertically

In Visual Studio Code, a while ago, when I used menu View → Split Editor, it would split vertically. (One file on the left and one file on the right.)
I updated Visual Studio Code and when when I do menu View → Split Editor, it always splits horizontally. (One file on the top and one file on the bottom.)
How can I split vertically?
Change editor split layout from horizontal to vertical
In 1.20
ALT+SHIFT+0 PC (Windows, Linux)
⌘+⌥+0 Mac
Pre-1.20
ALT+SHIFT+1 PC (Windows, Linux)
⌘+⌥+1 Mac
In 1.25
You can split editor into Grid layout. Check View=>Editor Layout
It is nicely presented in Release notes v1.25: VS Code grid editor layout
In 1.58.2 **
** Someone update this with the lowest version where this became true.
The menu entry with the shortcut given above is View=>Editor Layout=>Flip Layout
The Command Palette entry is labeled "Toggle Vertical/Horizontal Editor Layout"
The settings entry is
{
"key": "alt+cmd+0",
"command": "workbench.action.toggleEditorGroupLayout"
}
If you're looking for a way to change this through the GUI, at least in the current version 1.10.1 if you hover over the OPEN EDITORS group in the EXPLORER pane a button appears that toggles the editor group layout between horizontal and vertical.
To split vertically:
⌘+\ Mac
command: workbench.action.splitEditor
To split orthogonal (ie. horizontally in this case):
⌘+k+⌘+\ Mac
command: workbench.action.splitEditorOrthogonal
Method 1
Method2
View -> Command palette -> type 'split'
Method3
Method4
Tip
Add a Keyboard Shortcut for split Editor
Press CMD + SHIFT + P (MAC) and search for Toggle Editor Group
In version 1.23.1, it is Ctrl+Shift+P and Split Editor
This will divide the screens vertically and you can move through them using Ctrl+K+LeftArrow
By default, editor groups are laid out in vertical columns (e.g. when you split an editor to open it to the side). You can easily arrange editor groups in any layout you like, both vertically and horizontally:
To support flexible layouts, you can create empty editor groups. By default, closing the last editor of an editor group will also close the group itself, but you can change this behavior with the new setting workbench.editor.closeEmptyGroups: false:
There are a predefined set of editor layouts in the new View > Editor Layout menu:
Editors that open to the side (for example by clicking the editor toolbar Split Editor action) will by default open to the right hand side of the active editor. If you prefer to open editors below the active one, configure the new setting workbench.editor.openSideBySideDirection: down.
There are many keyboard commands for adjusting the editor layout with the keyboard alone, but if you prefer to use the mouse, drag and drop is a fast way to split the editor into any direction:
Keyboard shortcuts#
Here are some handy keyboard shortcuts to quickly navigate between editors and editor groups.
If you'd like to modify the default keyboard shortcuts, see Key Bindings for details.
⌥⌘→ go to the right editor.
⌥⌘← go to the left editor.
⌃Tab open the next editor in the editor group MRU list.
⌃⇧Tab open the previous editor in the editor group MRU list.
⌘1 go to the leftmost editor group.
⌘2 go to the center editor group.
⌘3 go to the rightmost editor group.
unassigned go to the previous editor group.
unassigned go to the next editor group.
⌘W close the active editor.
⌘K W close all editors in the editor group.
⌘K ⌘W close all editors.
Simply in windows
ctrl + # (the button 2 in the upper horizontal row of numbers in keyboard)
The key bindings has been changed with version 1.20:
SHIFT+ALT+0 for Linux.
Presumably the same works for Windows also and CMD+OPT+0 for Mac.
Use Move editor into Next Group shortcut:
Mac: ^ + ⌘ + Right/Left arrow
If you want to change shortcut:
Open Command Pallette (macOS keyboard shortcut: ⌘ + Shift + p)
Select Preferences: Open Keyboard Shortcuts
Search View: Move editor into Next Group
To change the editor in Landscape and Vertical mode, follow the steps below.
For example, open two files that you have in your left or right side bar, depending on where you are placed. By default it is always on the left.
Now that you have both windows open, you have to use the key combination for PC (Alt + Shift + 1) for (Windows and Linux Operating Systems) or for MAC (Cmd + Option + 1), as commented here v-andrew.
I just found a simple solution. You can drag an opened file and move towards the four sides of the Editor, it will show a highlighted area that you can drop to. It will split the view automatically, either horizontally, vertically, or even into three rows.
VSCode v1.30.2
Update: you can also drag a file from the Explorer to split the Editor in the same way above.
Right-click on the tab that you want to split it into another screen.
Then choose whether you want to split it (up-down | right-left).
I find this is the quickest way, and You can split it to as many screens as you want.
The best way is to configure the VSCode settings to make the default behavior the way you want:
Split Editor (to a new editor group)
"workbench.editor.openSideBySideDirection": "right" // left/right (default)
"workbench.editor.openSideBySideDirection": "down" // up/down
Split Editor in Group (does not create new editor group)
"workbench.editor.splitInGroupLayout": "horizontal" // left/right (default)
"workbench.editor.splitInGroupLayout": "vertical" // up/down

How can you enable the selection margin in Visual Studio Code (VSCode)

Is there a way to enable the selection margin in Visual Studio Code (VSCode)? By "selection margin" I mean the margin to the left of the text that allows you to select entire lines by clicking and dragging with the mouse.
I'm aware of triple-click. That's not what I'm after. Visual Studio (proper) has a so-called "selection margin", and I was hoping Visual Studio Code would have the same thing but it seems like it may not be there, or I just haven't figured out how to get it.
I also see a breakpoint margin, and the code folding area (or some dead-space if you disable the code folding). But that area doesn't work like a selection margin either.
You must show the line numbers through settings.json file:
// Controls visibility of line numbers
"editor.lineNumbers": true,
Then, when hovering that area, you'll see the inverted mouse to select the entire line, as you wish:

How to left-justify lines of code to the left edge of the window in eclipse

I have alot of code that has white space to the left of the lines of code in my eclipse project.
I would like to select pieces of this code and remove the extra white spacing so each line lines up with the left edge of the window.
You can select the code you wish, and press SHIFT+TAB until the code lines up to the edge of the screen.
You could also go to:
Window->Preferences->general->Editors->Text Editors
and when you're there, specify the tab width under:
Displayed Tab Width.
You can also customize Eclipses' formatter:
Go to:
Window->Preferences->Java->Code Style->Formatter
Select the formatter and press Edit. Edit it to your desire.
Then select the text you wish to format and press Ctrl+Shift+F

How to show margin of block in Eclipse?

I use notepad++ or extension for Visual Studio and I have seen the line (margin) of the block like the below image.
Can Eclipse do this? Thanks!
You can turn on the "Show whitespace characters" option under General -> Editors -> Text Editors. I find that too distracting.
Eclipse has a different way to control the display of blocks of code.
See the circle with a dash right after the line number 65. You can left click on that circle to close the block.
You can hover your cursor over the circle with the plus sign to see the "hidden" code.
Left clicking on the circle will open the control block again.