visual-studio-code

vscode preserve indentation when commenting out lines

戏子无情 提交于 2020-12-07 05:03:07
问题 In vscode (or most other editors I tried for that matter) when I have a block of code like this: function() { if(test1) { doThis(); andThenDoThat(); } } And I try to comment out the line andThenDoThat() e.g. by pressing Ctrl + / , I will get this: function() { if(test1) { doThis(); // andThenDoThat(); } } What I would like to get is this: function() { if(test1) { doThis(); // andThenDoThat(); } } In other words, I want the comment to preserve the original indentation of the code, and start

vscode preserve indentation when commenting out lines

白昼怎懂夜的黑 提交于 2020-12-07 04:57:51
问题 In vscode (or most other editors I tried for that matter) when I have a block of code like this: function() { if(test1) { doThis(); andThenDoThat(); } } And I try to comment out the line andThenDoThat() e.g. by pressing Ctrl + / , I will get this: function() { if(test1) { doThis(); // andThenDoThat(); } } What I would like to get is this: function() { if(test1) { doThis(); // andThenDoThat(); } } In other words, I want the comment to preserve the original indentation of the code, and start

vscode preserve indentation when commenting out lines

北慕城南 提交于 2020-12-07 04:56:58
问题 In vscode (or most other editors I tried for that matter) when I have a block of code like this: function() { if(test1) { doThis(); andThenDoThat(); } } And I try to comment out the line andThenDoThat() e.g. by pressing Ctrl + / , I will get this: function() { if(test1) { doThis(); // andThenDoThat(); } } What I would like to get is this: function() { if(test1) { doThis(); // andThenDoThat(); } } In other words, I want the comment to preserve the original indentation of the code, and start

Running C++ with VStudio Code using CodeRunner extension

南楼画角 提交于 2020-12-07 03:56:38
问题 I am unable to run my .cpp files from VStudio Code using the Code Runner extension. When I replace #include "test.h" with #include "test.cpp" in main it works fine but replacing it back gives me the following error; [Running] cd "c:\Users\dree\Desktop\TestRun\" && g++ main.cpp -o main && "c:\Users\dres\Desktop\TestRun\"main c:/mingw/bin/../lib/gcc/mingw32/8.2.0/../../../../mingw32/bin/ld.exe: C:\Users\dree\AppData\Local\Temp\ccm2RSvw.o:main.cpp:(.text+0x15): undefined reference to `MyClass:

VSCode cannot switch matplotlib backend: ImportError: Cannot load backend 'Qt5Agg' which requires the 'qt5' interactive framework

佐手、 提交于 2020-12-06 13:30:08
问题 I just want to plot by running Python in VSCode but in turn out failure. I cannot switch the backend from agg to Qt5Agg. However, I can easily do so in the terminal out of VSCode... The problem in VSCode integrated terminal is shown below, where I have tried various solutions but failed..: (base) user@user:~/test$ export MPLBACKEND=Qt5Agg (base) user@user:~/test$ python Python 3.8.3 (default, Jul 2 2020, 16:21:59) [GCC 7.3.0] :: Anaconda, Inc. on linux Type "help", "copyright", "credits" or

VSCode cannot switch matplotlib backend: ImportError: Cannot load backend 'Qt5Agg' which requires the 'qt5' interactive framework

半世苍凉 提交于 2020-12-06 13:28:20
问题 I just want to plot by running Python in VSCode but in turn out failure. I cannot switch the backend from agg to Qt5Agg. However, I can easily do so in the terminal out of VSCode... The problem in VSCode integrated terminal is shown below, where I have tried various solutions but failed..: (base) user@user:~/test$ export MPLBACKEND=Qt5Agg (base) user@user:~/test$ python Python 3.8.3 (default, Jul 2 2020, 16:21:59) [GCC 7.3.0] :: Anaconda, Inc. on linux Type "help", "copyright", "credits" or

VSCode cannot switch matplotlib backend: ImportError: Cannot load backend 'Qt5Agg' which requires the 'qt5' interactive framework

喜夏-厌秋 提交于 2020-12-06 13:28:01
问题 I just want to plot by running Python in VSCode but in turn out failure. I cannot switch the backend from agg to Qt5Agg. However, I can easily do so in the terminal out of VSCode... The problem in VSCode integrated terminal is shown below, where I have tried various solutions but failed..: (base) user@user:~/test$ export MPLBACKEND=Qt5Agg (base) user@user:~/test$ python Python 3.8.3 (default, Jul 2 2020, 16:21:59) [GCC 7.3.0] :: Anaconda, Inc. on linux Type "help", "copyright", "credits" or

VSCode cannot switch matplotlib backend: ImportError: Cannot load backend 'Qt5Agg' which requires the 'qt5' interactive framework

梦想的初衷 提交于 2020-12-06 13:27:06
问题 I just want to plot by running Python in VSCode but in turn out failure. I cannot switch the backend from agg to Qt5Agg. However, I can easily do so in the terminal out of VSCode... The problem in VSCode integrated terminal is shown below, where I have tried various solutions but failed..: (base) user@user:~/test$ export MPLBACKEND=Qt5Agg (base) user@user:~/test$ python Python 3.8.3 (default, Jul 2 2020, 16:21:59) [GCC 7.3.0] :: Anaconda, Inc. on linux Type "help", "copyright", "credits" or

how to keep shown the suggestions popup in vscode while moving the caret one character?

给你一囗甜甜゛ 提交于 2020-12-06 13:08:00
问题 how to keep shown the suggestions popup in visual-studio-code while moving the caret one character in the same word, so I don't have to hit ctrl-space shortcut again? 回答1: This should now be possible with VSCode 1.51 (Oct. 2020): Move cursor to select suggestions You can now move the cursor while suggestions are showing. For instance, you can trigger suggestions at the end of a word, move left to see more suggestions, and then use replace to overwrite the word. Theme: GitHub Light 回答2:

how to keep shown the suggestions popup in vscode while moving the caret one character?

99封情书 提交于 2020-12-06 13:03:18
问题 how to keep shown the suggestions popup in visual-studio-code while moving the caret one character in the same word, so I don't have to hit ctrl-space shortcut again? 回答1: This should now be possible with VSCode 1.51 (Oct. 2020): Move cursor to select suggestions You can now move the cursor while suggestions are showing. For instance, you can trigger suggestions at the end of a word, move left to see more suggestions, and then use replace to overwrite the word. Theme: GitHub Light 回答2: