What is the keyboard shortcut to cleanup code in IntelliJ WebStorm?
I keep getting the "Unterminated statement" warning and have to select "cleanup code" option every time to fix it. Is there a keyboard shortcut for the same?
If you double-click shift it will open a search-all window, where you can type literally anything, and it will search IDE options, files, symbols, etc.
Do that and type in 'cleanup code', see what happens. On the right side, there should be a keyboard shortcut. If there isn't any, you can assign it with settings windows.
Related
Is it possible while debugging, and a breakpoint has been hit, to autocomplete variables in the current scope in the Debug Console or the Watch Window?
An example gif is attached of where I would hope to get some auto-completion suggestions.
Essentially, on typing just long, I would like to autocomplete to work here so that it suggests longish_variable_name that I can then possibly tab complete.
VSCode has, by default, CtrlSpace mapped to triggering autocompletion suggestions, but this only seems to work in the editor window.
Use the variable once in the debug window, and auto-complete will do the rest of the work for you ever after (given the variable name shouldn't be changed, or you need to use it in the debugger console again to get auto-completion suggestion.)
I have a test variable named very_very_long_var — but the debug window didn't suggest anything on the first go. It was presented once I used it the first time in that window.
just after running the code ,An output tab appears ,to again write the code I have to use mouse to click on code writing area to hide this tab and write code once again and hide this tab.Is there any keyboard shortcut for this task ?here you can see that output tab which irritates me ! after running the code
just use the keyboard shortcut shift + Esc
Is it possible to alter the layout of the tool-bar icons?
The 'Continue' icon is right next to the 'Stop Debugger' icon, which is a really bad design and I've lost count of the number of times I meant to click continue but have accidentally clicked on the 'Stop Debugger' icon.
To my knowledge it is not possible to rearrange the buttons in the current build.
You have two options:
Build Qt-Creator (or at least the "Debugger Plugin") from Source, and change the UI to your liking.
Open a feature request on https://bugreports.qt.io/ and convince enough people to vote it up.
Consider using the keyboard short cuts. If you can't use a keyboard, consider using the fat "Run" button on the left bar which becomes a Continue button when stopped. This is ~300 pixels away from anything that could Stop debugging.
I'm C++ user, and I like to use watch window.
Everytime I want to investigate variables
I do it in watch window pannel..
Before vs2008 the shortcut was ALT+3.
really easy to press.
But with vs2012,
I must press CTRL+ALT+W, 1
I think this is really ugly.
hard to press, multiple step...
But I don't want to change default setting,
because I have many environment and
I don't want to configure the key setting
every time I move or change computer.
Is there any good way or
easy way to debug with out pressing that CTRL+ALT+W, 1 commend?
You could make the change to the shortcut key/keys, then you could export the settings.
Tools > Import and Export Settings Wizard. Exports into a file you can send to yourself etc.
Then you could import the settings you like into other visual studio environments you have ;).
To change it back to Alt+3
Select Tools/Options
Goto Environment/Keyboard
In the list of commands, scroll down to Debug.Watch1
It will tell you that the shortcut is Ctrl+Alt+W,1
In Press Shortcut keys box, press Alt+3
When I call cin or getline with cin in my Visual Studio 2010 C++ app, I can enter something in the console (as it should be), but the right-click context menu is "blocked". It doesn't appear - this means I and my clients are not able to use copy and paste.
How to enable the context menu in the console with cin?
This is an end user configuration for console windows. Click on the title bar icon, select properties, on the options tab, uncheck QuickEdit mode.
However copy & past is in fact simpler in QuickEdit mode: Right click performs an immediate paste operation if there is text in the clipboard. Text is copied by highlighting by dragging over the text to be copied, and pressing "Enter" to place the text in the clipboard. Switching off QuickEdit us useful for console programs that consume mouse events directly.
I am not sure that there is a programmatic method of switching the edit mode, but since it is by design an end user preference, it would probably be bad form to impose your own preference.