How to wrap text for mysql database results in PhpStorm - configuration

I'm wondering if there is a way to wrap text in the database tab in PhpStorm.
There are some very long results that goes further than I'm able to see.
Here is how that looks like:
Are there any kind of settings or preferences that can wrap text for mysql results in PhpStorm?
I'm using PhpStorm version 2019.1.1
EDIT
I found something that might solve this issue: https://www.jetbrains.com/help/phpstorm/database-tool-window.html (CTRL + F wrap), but I simply cannot find the icon for "Foreign Data Wrapper"

Foreign data wrappers are a concept in Postgres for remote object access. You're looking at the wrong docs, the database tool window is the one where you can create/configure datasources, the window that shows the data is the database console's result pane.
Anyways, AFAICT there is no way (yet) to show the columns wrapped by default. Only when for the edit mode you can activate soft wrapping. Double click on the column or hit F2, then use View > Active Editor > Soft Wrap.
In File > Settings > Keymap you can put that on a shortcut for easier access.
If you enable soft-wrapping for all "files" by specifying * in File > Settings > Editor > General > Soft-wrap files, then the table editor's edit mode is affected by it too and will wrap in edit mode by default.
See also
https://youtrack.jetbrains.com/issue/DBE-5534
https://youtrack.jetbrains.com/issue/DBE-1951
https://www.jetbrains.com/help/phpstorm/2019.1/settings-keymap.html
https://www.jetbrains.com/help/phpstorm/2019.1/database-console.html#f90b0d14
https://www.jetbrains.com/help/phpstorm/2019.1/table-editor.html
https://www.jetbrains.com/help/phpstorm/2019.1/settings-editor-general.html

Related

How to enable the use quotes on MySQL Workbench 6.3?

Since last MySQL Workbench update (6.3) it does not allow me to use single quote (') or double quote (") when writing a query.
Does anyone knows how to fix it?
That's a known bug. Here's a work around for mac though from another thread:
You can configure just the Workbench to use US keyboard layout, keeping others application with your native layout:
Go to System Preferences > Keyboard > Input Sources
Enable booth keyboard layouts (yours and the US)
Check "Show Input Menu Bar" and "Automatically switch to a document's input source"
Then with the MySQLWorkbench app active, change your keyboard to US using the icon in Mac's menu bar

How to edit multiple files through "Find results" in Sublime Text

When I search multiple files via Command + Shift + F, the result is returned as something like a text file. This text file is editable, but changes made don't affect the original files.
Is it possible to do such that changes in "Find Results" propagates to the original source file?
The Find Results Apply Changes plugin was created to do just that.
You can install it through Package Control's "Install Package" option.
Before using this plugin, make sure that you have UTF-8 encoding enabled using the menu:
File > Save with Encoding > UTF-8
Once installed, you can apply any change you made to a "Find Results" buffer back to the files:
Search for "foo" in a folder (Sublime's default shortcut is CTRL+SHIFT+S)
This will open a "Find Results" buffer listing all the files with "foo" in it.
Change the instances of "foo" for "bar" or something else...
Go to the menu:
Find > Find Results - Apply Changes
This will write all the changes made back to the files and save the modified files automatically.
By default, using menus is the only way to make it work. However, it is quite tiresome and doesn't save as much time as it does with a keyboard shortcut. You can set your chosen keyboard shortcut by adding a new line in
Preferences > Key Bindings - User
by adding:
{ "keys": ["ctrl+r"], "command": "find_results_apply_changes" },
Don't use CTRL+S as it will overwrite saving file shortcut.
Warning!: According to the author of the plugin:
Uses regions to allow you do multiline changes, but when inserting new
newlines, will corrupt files if you commit more than once, this
because the new newlines will shift the line numbers. Will also
'corrupt' files if you add/remove newlines in other instances of the
modified files. eg in another tab. To prevent corruption this packages
will alert you and prevent most of these.
(This is a modified version of the description from the Find Results Apply Changes Github page.)
The shortest workaround I can think of would be to open the target file from search results by simply double clicking the path and then jumping to the according line using Ctrl+G on Windows or ⌃+G on Mac OS.
That's the way I do it and must say it is only a matter of seconds, even without the plugin.

pressing ctrl+w in mysql workbench results in ETB

So I'm using the MySQL Workbench SQL Editor 5.2.45 CE
However whenever I try to close a tab using the keyboard shortcut Ctrl+W, instead of closing the tab it prints out "ETB" in the query editor instead and does not close the tab...
Any idea what's causing this and how to resolve it?
You are probably working on Windows. The ETB output is from the editor when the hotkey is not handled in the UI and hits the editors input processor without being defined for an action (like select word or copy to clipboard). The editor control is a Scintilla instance which is able to also display non-printable characters.
The hotkey Ctrl+W was previously used to close tabs, but since Ctrl+F4 is much more common on Windows it was changed. So use Ctrl+F4 in the future instead.

Sublime text 2 tab through multiple selection

Lets say that I have selected the word 'test' three times using ctr + d.
Is there a way to tab through the selections. So for example if I wanted to go to the second word and only change that one.
I seem to need this quite often but I cannot find it anywhere.
And I also know about the skipping with ctr + d and ctr + k but this is not what I mean.
The MultiEditUtils package supports this.
Just install the package and bind a key to the selection_fields command, e.g.
{ "keys": ["alt+d"], "command": "selection_fields" },
To use it just create your multiple selection and press the keybinding. Then you can use tab and shift+tab to tab through the selection. If you tab behind the last one or press escape, then the multiple selection will be restored.
Demo:
It sounds like what you want is search. Sublime's search is accessed via Control+F (Windows/Linux), or Command+F (Mac). Sublime's search behaves similarly to many other applications, often web browsers have this feature. You can use this to cycle through instances until you find the one you were looking for. If you then hit enter, search will exit and the cursor will stop at the currently selected instance of your word.
See Sublime's unofficial docs for more details about its full search capabilities.
Hit Control+F to bring up the search
Type the term you want to replace
Put your cursor at the beginning of your document
Hit Control+G to select one
instance after the other and change it

IntelliJ IDEA compare tabs

I'm using IDE 10.5 Community edition.
In one project, I have multiple modules. I also have opened multiple tabs in the editor from different modules.
Is there a way to compare the content of two different tabs in the editor, which can be from different modules?
Select two files (with pressed Ctrl) in project view panel → Right Mouse button → Compare Files.
Right click on the file in project view → Compare With... (Ctrl+D)
If you have opened one file in editor you can navigate in project view to another file and press right mouse button on that file Compare with Editor.
It is possible to compare file against your clipboard content. View → Compare With clipboard
Also you can use idea as external diff tool idea diff file1.txt file2.txt
Outdated; Old verison of IntelliJ: Also you can compare files from 'Commander' tab, just select two files in right and left panels, right click on any of them → Compare two files
There is a plugin Compare Tab With Editor which may not have existed when this question was asked. I'm using it with IntelliJ 2017.2.
There is an updated version for IDE versions 2020.3 — 2022.1, Compare Tab With Editor 2.
One simple solution is the 'Compare with Clipboard' function (in your contextual menu - right click), which allows you to compare the contents of an editor tab with whatever is in your clipboard. As long as you can copy something, you can compare it against a file...
In 2019, select your file and "compare with editor" (which is your opened tab)
I use this to have a config file loaded in intelliJ (which is changed by the server, not stored in my project) and need to compare it to a baseline (in my project)