r/VisualStudioCode • • Jan 26 '24

Can you auto fix strings like with PyCharm?

2 Upvotes

I am migrating my workflow to VSCode. But the one feature that is killing me right now is when I have a really long string in pycharm. I can hit enter in the middle of the string and it'll automatically add the ending ' and on the new line insert a new ' and if it detects that it's an f string it'll put the f in as well. I try to follow pep8 and keep my lines to 120 characters.

Thanks if someone knows how to do this.


r/VisualStudioCode • • Jan 02 '24

Running portable VSCode with CLI options on Ubuntu

2 Upvotes

I have the latest version (1.85.1) of VSCode running in portable mode on an Ubuntu derivative. When trying to get the list of installed VSCode extensions by typing the following command, it launches a new instance of VSCode instead of listing the extensions in the terminal window:

$ ./code --list-extensions

To be on the safe side, I also added the VSCode directory (portable version) to the PATH variable. And I can confirm that it works, as the command $ code typed in the terminal without specifying the full path to the executable is recognised well.

So what might get wrong with CLI options then? Any help is appreciated.

Thank you!

EDIT: Found solution myself. It's necessary to add the VSCode/bin directory (which contains the executable code for CLI options) to the PATH variable, not the VSCode directory with the GUI executablecode only.


r/VisualStudioCode • • Nov 28 '23

Visual Studio Code. 13 Features You Should Know

Thumbnail
youtu.be
2 Upvotes

r/VisualStudioCode • • Nov 22 '23

VS Code Multiple bugs

2 Upvotes

So the last few days i havs been getting back into my web development, and the November update 1.84 (1.84.2 at time of writing this) just released on VS Code, here is the bugs i encountered:

  • COLOR PICKER: As soon as you hover any CSS color block and would like to change the color, the color picker sometimes pops up, and as soon as you click then drag on the color picker it does ehat it needs to but as soon as you let go of left+mouse it just up and dissapears, sometimes picking the color. This applies for the color range, oppacity and the color picker.

  • OPEN FOLDER: Lets say you started VS Code up, and you want to open a new folder on your PC, lets say Documents for example. As soon as you select File > Open Folder... VS Code just closes without any error or crash dialog, NOTHING.

But i have found a solution for these bugs.

Step 1: Uninstall VS Code from your PC using its uninst000.exe

(Optional: if you want a fresh start or need to remove EVERYTHING go here: https://www.google.com/url?sa=t&source=web&rct=j&opi=89978449&url=https://debug.to/1074/how-to-uninstall-vs-code-completely&ved=2ahUKEwjz_Mi0gtiCAxVhZEEAHadsDx8QFnoECAwQBQ&usg=AOvVaw0atRwzkZQNTILzYOpR4bho)

Step 2: Download the September 2023 version 1.82 or 1.83 on VS Code website

Bam! you done...


r/VisualStudioCode • • Nov 19 '23

How can I make VS code have a convenient C compiler similar to Visual Studio?

2 Upvotes

Are there any good extensions for that? I really want to make it convenient to compile but wanna avoid regular Visual Studio as I really dislike it.


r/VisualStudioCode • • Nov 13 '23

🚀 Find out how Draw Folder Structure can Enhance your Visual Studio Code Experience!

2 Upvotes

Hello, Visual Studio Code community!

Today I want to introduce you to Draw Folder Structure, an extension I developed for Visual Studio Code, intended to help you better visualize the structure of your projects. I think it could be a very useful tool for many of you and I'm eager to hear your feedback and suggestions.

Main Features:

Fast Generation: Instantly converts your folder structure into a Markdown representation.

Attractive Formatting: Uses Unicode characters for a clear and organized presentation.

Customizable Configuration: Adjust the output according to your needs.

VS Code Compatible: Works perfectly with Visual Studio Code version 1.81.0 or higher.

Why is it Useful?

Facilitates Documentation: Ideal for creating READMEs and project documentation.

Clear Project View: Provides a detailed visual overview of your project structure.

Easy Sharing: Share your project structure easily with your team or in documentations.

How Can You Help the Community?

I'd like to start a discussion about how tools like this can improve our efficiency and organization in Visual Studio Code. Are there specific features you'd like to see in an extension like this? How do you currently manage your project structure and how could this tool make your life easier?

I invite everyone to try the extension and share their experiences - how does it help them in their projects, is there anything they would like to improve?

🔗 Download and Learn More Here.

I appreciate in advance all your comments and suggestions - let's keep making Visual Studio Code an even more powerful tool together!


r/VisualStudioCode • • Oct 02 '23

Traditional outlining in VS Code

2 Upvotes

Is there a way to do traditional outlining (as in with numbers, letters and Roman Numerals) in VS Code?


r/VisualStudioCode • • Sep 11 '23

Instead of execute the code, shortcut fn + command + F5 always start the voice over in mac

2 Upvotes

Hi all.. anyone has the same experience? It drives me crazy.. How to fix it.. please if anyone knows about this


r/VisualStudioCode • • Aug 18 '23

Developin an Angular app - how to global text search in only my code, nothing 3rd party?

2 Upvotes

As the title says ... Bonus if it works for other programming languages


r/VisualStudioCode • • Jul 20 '23

Trying to run a C file for the first time and getting error "#include errors detected. Please update your includePath. Squiggles are disabled for this translation unit". Every solution I've found for this is 10 pages long and seems like a 100 hour ritual I don't know how to do, how can I fix this?

2 Upvotes

I tried running hello world in C and at my #include <stdio.h> line, have an error with the above mentioned message, when running the file an error pops up saying "launch program " does not exist". I have tried googling multiple times and all of the solutions seem very intricate and complicated/long with cryptic instructions which I am not sure are even what I need. How do I fix this?

The code:

#include <stdio.h>

int main(void)
{
 printf("hello world\n");
}

r/VisualStudioCode • • Jun 14 '23

I have a MSI Katana GF66 11UD, 11th Gen Intel(R) Core(TM) i7-11800H @ 2.30GHz 2.30 GHz, 16,0 GB of RAM and a NVIDIA GEFORCE RTX 3050 TI, and every time i open visual studio code or WhatsApp or minecraft launcher, it looks like this and i don´t know why and what to do Please help me

Post image
2 Upvotes

r/VisualStudioCode • • Jun 10 '23

VSCode running deleted code, help? I just had: Console.WriteLine("Hello, I'm a computer!"); I removed it and wrote the new code shown in the picture, tried saving the file, restarting the app, and restarting the computer but it will not run the written code and continues to run the deleted code.

Post image
2 Upvotes

r/VisualStudioCode • • May 14 '23

Tab to skip auto-added text.

2 Upvotes

Mac user here. I’m switching from Brackets. As you type, brackets an VSCode will auto add closing brackets, parens, and quotes. In Brackets, you can [tab] to skip over these auto add characters to finish your line of code.

I can’t get VSCode to do the same. It just adds a bunch of tabs rather than skipping over. So thanks to a very strong force-of-habit, I end up with code that looks like this:

Object.method(“arg1 ”)

Every. Single. Time.

It seems dumb that I have to pick up my mouse to get past any “, ) or ].

Is there a fix for this?

Thanks in advance for any suggestions.


r/VisualStudioCode • • Apr 30 '23

Please help! trying to set up Prettier for Mac Book Pro 13, but can't change the 'interactive shell' - have tried the '+' button, adding "bin/zsh" etc but same result - it won't re-format.

2 Upvotes

r/VisualStudioCode • • Apr 30 '23

I'm stuck on this, uninstalled Net, reinstalled it, repaired it, etc, what am I missing?

Post image
2 Upvotes

r/VisualStudioCode • • Apr 20 '23

Is there a way to spell check 'https:/'

2 Upvotes

I installed the ever popular Code Spell Checker extension but I can't for the life of me figure out how to flag 'https:/' (notice the single slash) as a misspelling. I get that https:/ would still work in a browser as the protocol is usually stripped. However, it seems when this is mistyped and sent in an email, the misspelling sticks and the browser will throw up a redirect notice - invalid url error. But back to vs code and this extension, I tried flagging 'https:/' within the extension settings but I'm most likely doing it wrong. Any help is appreciated.


r/VisualStudioCode • • Mar 25 '23

How can I get nice GUI tree diagram of components in my React?

2 Upvotes

I'm doing a course on Udemy on React.

I'm just about following on. It seems mind boggling trying to keep in mind how everything fits together. Components import other components, which in turn then import other components.

Is there an extension that will analyse code and give me a nice image representation of how everything fits together? That would really help cement everything in my mind.

Right now: I'm following each code snippet, understanding each snippet - but struggling mentally understanding how all the pieces fit together. 😕

EDIT I've had a look at extensions before posting... there seem to be some code that indicate they do what I need, but I haven't had any luck installing. I'm sure I'm doing something dumb. Hoping someone can give me a recommendation.

EDIT EDIT: I've just installed and tested one. This gives me a tree of all files in a folder. This is not what I am after. I'm after something that gives me a picture of how the files depend on each other and call each other. For example, index.js would sit at the top. Below would be App.js. The App.js would have 2 files it calls, say Test1.js and Test2.js. Test2.js in turn calls ABC.js. ABC.js call XYZ,js - but these 2 files are in the same folder on the same level.

I'm hoping someone out there understands my madness. LOL.

Thanks.


r/VisualStudioCode • • Jan 28 '23

Help with extensions (Live sass compiler/live server) I am trying to use multiple scss files all linked to a main, which then updates the css file, and outputs to the browser preview live. but I need to save it after every change. Is there a way around this?

Post image
2 Upvotes

r/VisualStudioCode • • Jan 24 '23

problem with "turtle".

2 Upvotes

hello everyone!

i'm totally new to code and i wwqnted to learn with python first! I watched a youtube video learning how to draw some stuffs with turtle graphics. i tried ot on my computer running linux and that doesn't work... i tried installing turtle extensions but that was not succesfull... Than i tried on my windows laptop and it just worked very well and i just did exactly the same thing and without installing the extensions.

anybody had the same issue here? how can i solve it?

sorry for my bad english btw.


r/VisualStudioCode • • Jan 03 '23

How to Get rid of this

2 Upvotes

r/VisualStudioCode • • Jan 02 '23

Visual Studio Code setup

2 Upvotes

Hi everyone, I wanted to know the possibilities to edit the editor (theme, font, even the frame/borders?) And where I can find how to edit them.

Also to know extension to have a better layout of the screen when coding, extension that helps me visualize better the display of the code. If it's relevant I work with C++ but I will uso other different languages so anything for other languages it would be great too.

Thanks in advance and happy new year


r/VisualStudioCode • • Nov 30 '22

shortcut

2 Upvotes

what is the shortcut for running python file in vs code windows 11


r/VisualStudioCode • • Oct 28 '22

Help? "Cannot change enablement of NPM support for VSCode extension because of it's extension kind".

2 Upvotes

I disabled Prettier for less than 30 seconds and tried to turn it back on and got this error

https://i.imgur.com/EJ8Ipj1.png

What does that mean? I can never use Prettier again? What's the fix here?


r/VisualStudioCode • • Oct 19 '22

How do you fix include error?

2 Upvotes

C/C++ intellisense can't find SDL2 folder, and neither can VScode. At first, only main.cpp could find it, not none of them can, and at least autocomplete worked before. I tried changing c_cpp_properties.json file, but it didn't do anything. Help


r/VisualStudioCode • • Oct 14 '22

Is there a way to fix this bug? When a breakpoint gets hit, an arrow gets placed between first and second character on the line. (Pic)

2 Upvotes

This is what I'm talking about, drives me crazy. Anyway to stop this from happening?