4 ms·
I enjoy working in C and C++ (on Windows) using Sublime Text however I am thinking of giving VSCode a proper try. I know many people use VSCode for web related
by satysin 10y ago
I enjoy working in C and C++ (on Windows) using Sublime Text however I am thinking of giving VSCode a proper try. I know many people use VSCode for web related development but MS seem quite serious about improving its support for C and C++.
My question is does anyone here use VSCode for C and C++? What is your setup? task files, etc?
- jhasse 10y agoYes, I'm using it for C++ dev :) I'm mostly using the C/C++ extension from Microsoft, unfortunately it's still closed source. I'm developing on Linux and Windows with MSYS2. Here are my config files: https://gist.github.com/jhasse/a3898302e4f8be682d053dd5e3b4b62a https://gist.github.com/jhasse/a3898302e4f8be682d053dd5e3b4b...
- satysin 10y agoAwesome, thank you!
- erikbye 10y agoWhy use VSCode over Visual Studio for C/C++ when your environment is Windows? If you were on Linux or Mac I would recommend CLion or Qt Creator if you wanted a proper IDE. Or a heavily customized Emacs. But on Windows, I would recommend Visual Studio.
- jhasse 10y agoVS Code has some features that normal Visual Studio doesn't have. Like multiple cursors or better Git integration.
- erikbye 10y agoHm, feature wise VS is far ahead. Not sure exactly how the Git integration is better? In addition to improved Git integration with the more recent VS releases there is also a GitHub extension. VS also has multi-cursor support, if we are thinking of the same thing... editing more than one line simultaneously? Besides, these two features you mention seem hardly to be of deciding factor, you would think something like code analysis, profiling, and better debugging (memory window, etc) would be of more importance.
- jhasse 10y ago> Not sure exactly how the Git integration is better? I can directly see which lines have changed in VS Code on the left site of a file. > VS also has multi-cursor support, if we are thinking of the same thing... editing more than one line simultaneously? You can add multiple cursors by Alt + Left mouse button in VS Code. This allows to even modify multiple words in one line simultaneously. > Besides, these two features you mention seem hardly to be of deciding factor, you would think something like code analysis, profiling, and better debugging (memory window, etc) would be of more importance. Profiling isn't something I do every day, but code editing is. Also you can use both of them at the same time, only falling back to VS for these features. Furthermore keep in mind, that VS is only free for commercial use under some circumstances (under 200 employees IIRC).
- erikbye 10y ago> I can directly see which lines have changed in VS Code on the left site of a file. VS has this too. Except, by default, it is on the right side of the editor. Uncommitted is in yellow. The white "marker" or hyphen, moves with the line number your cursor is on. Just like in VS Code. You can also see commits on each function and class, by author and date. You can right click each commit and view details for that commit, or send an email to the author. https://s17.postimg.org/of5tv8lcf/image.png https://s17.postimg.org/of5tv8lcf/image.png > You can add multiple cursors by Alt + Left mouse button in VS Code. This allows to even modify multiple words in one line simultaneously. In VS you can hold alt + shift and use arrow keys to select the number of lines you want to edit simultaneously, but looks to not be possible to place several cursors on a single line. Still, VS has a lot more features going for it that are very powerful. And besides, most people who argue a text editor vs IDE and place importance on text editing speed, forget that it is about quality code, not how fast you wrote that code. The few lines of code the average developer writes a day makes text editing speed of very little importance.
- jhasse 10y ago> VS has this too. Except, by default, it is on the right side of the editor. Uncommitted is in yellow. The white "marker" or hyphen, moves with the line number your cursor is on. Just like in VS Code. > > You can also see commits on each function and class, by author and date. Both not working for me. Are you sure that this also works with C++ code?
- gusmd 10y agoI mainly use Visual Studio for C++, and Atom for all other things. I gave VSCode a chance a couple of weeks ago but its code completion was not as smart as on VS (no semantic analysis), so I ended up giving up and going back to my VS + Atom setup. Since you are already using Sublime, you might like it. It felt polished and nice to work on. An improvement over Atom IMHO.
- izacus 10y agoAt this point VSCode doesn't even support C++ IntelliSense and the basic "Go To Implementation" / "Go To Definition" commands mostly don't work. If you have the full Visual Studio available, the experience will be superior.