How can I change the WebStorm shortcut so that I press Enter to complete my code instead of using Tab - webstorm

I'm used to VS code using Enter to complete code, but WebStorm uses Tab to complete code, how can I change this setting for WebStorm, I already added VScode keymap, but it didn't work

Related

VS Code - Failing to take input from terminal

I am fairly new to tweaking with the settings in VS Code. I have installed the code runner extension on VS Code. I have also updated the settings to make the code run in terminal, instead of the output tab.
This works fine with other languages, but in case of C++, it fails to take inputs and finishes execution as soon as it compiles. What could be causing this?
Go to settings in VS Code, and look for the property "Run in Terminal" under Code Runner settings. Check that box, and update your compiler directory. Once you do this, reload the VS Code window and run your code again, the terminal should take inputs now.

Where is std::cin when std::cout is going to the "Output" pane of VSCode

When I do a "Run Code" command in Visual Studio Code in Windows (it's the first option when I right-click in the editor), the std::cout output goes to the "Output" pane of VSCode. But when this happens, where is std::cin? You can't type in the "Output" pane, and the code hangs at any cin lines.
Is there some other place that's working as std::cin when I run this way? And if not, is there some way to configure the "Run Code" command so that cin and cout go to a terminal? I've already tried editing the console argument of settings.json, like the first solution to this github issue (or its latest equivalent, since the externalConsole option is deprecated), but it doesn't help, I think because output just isn't going to any console at all.
(also, the "Run Code" command does not enter a debugging session, just compiles and executes. Regular debugging works fine and cin and cout go to the terminal specified in settings.json)
what you say is provided with two extension of VSCode.
The "Run Code" command in right click menu is likely provided by extension Code Runner
The 'settings.json' and the issue talks about the Microsoft's official C/C++ support extension C/C++
For you case, you may need to set this setting for Code Runner if you want to use the stdin of process
"code-runner.runInTerminal": true,

Is there any way to compile C++ code by pressing f5 or any other key in VScode?

Is there any shortcut key in vscode to compile C++ code , like vim or atom has f5 ? Press the key and you have a black dialog window . I use vscode for competitive programming and I compile code using "g++" syntax on command prompt . Any method faster than this will work .
You need to install the extension called "Code Runner". To do that :
Click on the four squares with one square not align icon on the left.
Type "Code Runner", find the extension and install it.
Also install the "C/C++" extension.
When both extensions are installed, to compile and run, press Ctrl + Alt + n.
Small tip :
If you want to use VS Code for competitive programming, you might want to change where the code runs to the terminal. As default, the c++ code will get executed in the "output" window but that is a output-only window, so you will not be able to test inputs. To run the code in the terminal (in which you can output/input) follow these steps :
Go to the Code Runner extension settings
Search for "run in terminal" and click in the small square.

run option gone from Microsoft Visual C++ 2010

I think I accidentally changed some settings in my MSVC 2010 compiler and now I can't find the compile and execute option. Also when I hit the tab button for indentation an arrow(->) appears. I wonder whats wrong??
Use the tools menu "Import and Export Settings" then select "Reset all Settings" to reset the settings back to default.
To reset editor blunder, just hit Ctrl+Shift+8, from inside the text editor itself. This is toggle-able option, which can be used to see white spaces. Sometimes useful!

Why doesn't Edit & Continue work for me in VS2008 with a legacy C++ win32 project?

If I create a new win32 C++ project in VS2008 I can use Edit & Continue with it just fine, but with this legacy project I'm working with my attempts to use / enable it have failed.
Here are things I've checked:
Tools -> Options -> Debugging -> Edit and Continue -> Enable Edit and Continue is ON.
Debug Information Format: Program Database (/Zi)
Code Generation -> Enable Function-Level Linking: Yes (/Gy)
Looked for a corrupt .ILK file. I can't find any .ILK files - are they still used in 2008?
But when I step into the program, change the next line, and step again, I get:
"This source file has changed. It no longer matches..."
rather than
"Would you like Edit & Continue to apply your code changes."
What's wrong with this project that E&C doesn't work?
I assume you have debugging symbols/etc and the legacy C++ application had been compiled with this support...
If not, then you will run into the problem that the code was not 'instrumented' to allow for injection of alternate code.
I would suspect that the changes in output code format would make VC++ 2008 incompatible... as I doubt Microsoft added such backwards compatibility in (until VS 2008, I think they even made it hard to use older versions of .Net without using the specific VS)
This messagebox
This source file has changed. It no longer matches the version of the file used to build the application being debugged.
seems only to be appearing when I made a code change on the exact line where the breakpoint is.
I've found that I can just click the OK button. And when I then press F10 to actually execute the line that has changed, "Edit and Continue" kicks in and recompiles the code.
After that, the breakpoint is disabled though (it shows a yellow triangle with an exclamation mark):
To re-enable it, you can just right-click the breakpoint and choose "Location...":
which brings you to this dialog:
:
where you need to check the "Allow the source code to be different from the original version" checkbox. Click OK and your breakpoint will be enabled again.