Visual Studio 2013 is inserting tabs instead of spaces - tabs

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.

Related

Octave (GUI): Clear all variables of the work environment in one go

GNU Octave, Version 6.1.0, using the GUI:
Is there a way to clear all variables that are listed in the work environment without restarting Octave and without clicking and clearing every single variable?
This is needed for a cold start when switching to a new task, when you still want to keep opened the already opened files.
Taken from the helpful comments, here are the ways to choose from:
Type "clear" in the editor.
Edit->Clear Workspace in the menu.
Not recommended of course, but possible: you could also just close the GUI and open it again. Then, you should at best use the setting to re-open tabs from the previous session when you close the GUI and open it again. See Edit -> Preferences -> Editor -> File-Handling -> Restore Editor Tabs from previous session on startup or when editor is shown again after closing

Split selection into lines in PHPStorm

In Sublime I was quite fond of the "Split selection into lines" shortcut (super+shift+l). However I cannot find an equivalent of that in PHP Storm 8, I've found a "Split into lines" function in the Edit menu but feeding it either \n or \r doesn't seem to work. Does that function exist in PS ?
By default on PHPStorm 10+, you can toggle the Column Selection Mode with:
CMD + SHIFT + 8
Of course, you can configure any stroke you like. I like to keep the original one and add the one that matches Sublime which is CMD + SHIFT + L. Here is how:
Another option would be to use column selection mode:
https://stackoverflow.com/a/30031481/672989
There is a "Split Selection into Lines" action in the Extra Actions plugin.
Compatible with: Compatible with: IntelliJ IDEA PhpStorm WebStorm PyCharm RubyMine AppCode CLion GoLand DataGrip Rider MPS Android Studio
If I have a 200 line selection I don't want to have to create a cursor at the end of every line.
You do not have to "create a cursor at the end of every line" -- just create cursor on the beginning of each line (on Windows it would be Alt+Mouse drag Down/Up) and then just press End button. This is not that straightforward as separate dedicated action .. but still does the same job and pretty easy to execute.
In any case: there is no such exact action currently available in PhpStorm, unfortunately.
Please follow this ticket (star/vote/comment) to get notified on progress: http://youtrack.jetbrains.com/issue/IDEA-122181

phpStorm 7 Code Completion Issues

Since updating to phpStorm 7 for OSX, I cannot get code completion for HTML to stop.
For example, if I type class=, as soon as I hit =, two double quotes are injected. How can this be stopped? Is this a bug? I've unchecked everything under Preferences > Editor > Smart Keys and Code Completion.
It is now possible to disable this feature:
http://youtrack.jetbrains.com/issue/IDEA-113332#comment=27-612047
If you go to Preferences -> IDE Settings -> Editor -> Smart Keys
and untick the box marked "Automatically add quotas for attribute value", you will be back to normal (non-frustrating) behavior.
There is a known issue. It will be possible to disable this behavior in the future versions.

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.

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)