pressing ctrl+w in mysql workbench results in ETB - mysql

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.

Related

How to wrap text for mysql database results in PhpStorm

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

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

Shorcut for `Run Line(s)` in Octave / Matlab

In RStudio it is Ctrl+Enter, while in PyCharm it is Ctrl+backslash, but I can't find a similar shortcut for Octave (not so interested in Matlab). There has to be a way to run a single line of code on the editor without running the entire document. I know there is a method to run chunks of code, but this doesn't seem practical, either.
You need to select the code that you want to run first. The actual shortcut to then execute the selection is configurable (Edit > Preferences...) but defaults to F9.
Or you can right click on the editor which shows you the options and shortcut:

Visual Studio 2013 is inserting tabs instead of spaces

I have set Visual Studio 2013 to "Insert spaces" in Tools -> Options -> Text Editor -> All Languages -> Tabs. The settings for Text Editor -> C# -> Tabs is also set to "Insert spaces". When I open up a C# file and use the tab key then VS is keeping the tab instead of inserting spaces. If I go back into Tools -> Options -> Text Editor -> C# -> Tabs and switch to "Keep tabs", click OK and then go back in and change it back to "Insert spaces" then VS starts using spaces. If I close VS and open up a C# file VS is using tabs again. I have to go back in and select "Keep tabs", click OK and then go back in and change it back to "Insert spaces" for it to work again.
Additionally, when VS is keeping the tabs if I complete a statement with a semicolon or close a block with a brace then the tabs which VS was using are then replaced with spaces. Or if I do a code reformat then it will change all the tabs to spaces. Any ideas as to why VS is initialing using tabs?
Also, I am using Resharper. Resharper is also set to use spaces. When I suspend Resharper I experience the exact same behavior in VS, so I don't think Resharper is causing the issue.
In my case the culprit was another extension, VsVim. I suppose the first step in troubleshooting this should be disabling all extensions and if that resolves the isse then re-enabling them one at a time to determine the offending extension. To resolve the issue with VsVim expandtab can be turned on: :set expandtab.

Does chrome dev tools have anything similar to sublime text's snippets and tab triggers?

When I'm writing code in sublime text, I have the ability to create "snippets" that I can "tabtrigger" into my code.
For example, If I'm writing some js code and I want to log something to the console, I created a snippet so that all I have to do is type "log" and hit tab. As soon as I hit tab console.log(); is inserted into my code. Google seems to have a different definition of snippets, and I was wondering if the described functionality is available when writing code directly in the dev tools source panel?
I did not find this Tab trigger ability in Chrome but a way to simmulate this operation:
Using AutoHotKey
Run it after installing , and right click AutoHotKey in the taskbar corner -> Edit This Script
Add the following to the script files.
#IfWinActive Developer Tools -
::ml::
SendInput {Raw}margin-left:10px;
return
write your own script like above, then save it and Reload This Script
Have fun!
More to say:
#IfWinActive means this part only applies to the current window whose name started with Developer Tools - .So if you want this script work, you shoul make the develop window seperated from the main Chrome window to have this window name.
::ml:: defines the keys to trigger, the starting :: means this is a word , which can only trigger when it is followed by a space key or an enter key or a tab key a semicolon key and so on. Otherwise it will soon output margin-left:10px; once you typed ml .
SendInput with {Raw} can avoid triggerring endless loop. eg. bb -> border-bottom:1px solid #bbb; the output is ended with bb; and AutoHotKey will auto minimize the current window to avoid endless loop.