반응형

[VSCODE] 확장프로그램 - indent-rainbow

 

현재 편집기 창 탭 크기를 사용하고 혼합 탭 + 공백을 처리할 수 있습니다(권장하지 않음). 

 

또한 들여쓰기가 탭 크기의 배수가 아닌 줄을 눈에 띄게 표시합니다. 시각화는 일부 상황에서 들여쓰기 문제를 찾는 데 도움이 될 수 있습니다.

 

 

https://marketplace.visualstudio.com/items?itemName=oderwat.indent-rainbow 

 

indent-rainbow - Visual Studio Marketplace

Extension for Visual Studio Code - Makes indentation easier to read

marketplace.visualstudio.com

 

반응형
반응형

https://sdc-james.gitbook.io/onebook/2./2.1./2.1.5.-visual-studio-code

 

3.1.5. Visual Studio Code 설치 - OneBook(Python & Deep Learning)

Visual Studio Code(약자 VS Code)는 편리한 프로그래밍 에디터 입니다. Visual Studio Code (VS Code)는 크로스 플랫폼 소스 편집기로서 윈도우즈, 리눅스, Mac OS 에서 무료로 사용할 수 있습다. Visual Studio Code를

sdc-james.gitbook.io

Visual Studio Code(약자 VS Code)는 편리한 프로그래밍 에디터 입니다. Visual Studio Code (VS Code)는 크로스 플랫폼 소스 편집기로서 윈도우즈, 리눅스, Mac OS 에서 무료로 사용할 수 있습다. Visual Studio Code를 설치한 후 여러 Extension들을 설치할 수 있는데, 파이썬 Extension을 설치하면, 파이썬 프로그래밍과 디버깅을 할 수 있습니다.
다음 링크에서 다운로드 할 수 있습니다.
User Installer는 현재 로그온된 사용자 계정에만 설치를 하며, System Installer는 Windows 전체 사용자 계정에서 사용할 수 있도록 설치(관리자 권한 필요)합니다. 저는 System Installer 버전을 다운로드하여 설치하겠습니다.
기본 옵션으로 설치를 끝까지 진행 합니다. 마지막에는 자신이 편리한대로 설정해 줍니다.
 
VSCode 가 설치 완료되면 필요한 Extension 들을 설치해 줍니다. Visual Studio Code를 설치한 후 여러 Extension들을 설치할 수 있는데, 파이썬 Extension을 설치하면, 파이썬 프로그래밍과 디버깅을 할 수 있습니다.
좌측 상단에 python을 입력하면 여러가지 Extension들이 나타납니다. 이중 Python Extension Pack 을 설치하면 Python, MagicPython, Visual Studio InteliCode, Django 등이 한꺼번에 설치됩니다. 이렇게 파이썬 Extension을 설치 완료하면 파이썬 프로그래밍을 진행할 수 있습니다. korean language pack 도 설치해 줍니다.
Pylance, Material Theme, Material Icon Theme, Prettier 등 필요한 Extension 들을 설치해 줍니다.
Pylance : Fast, feature-rich language support for Python
Prettier : 파일 저장시 알아서 포매쇼에 맞게 소스 코드 정
 
이제는 Visual Studio Code의 기본 터미널이 Windows의 Power Shell로 설정되어 있기 때문에 약간의 수정이 필요합니다.
이 기본 터미널의 종류를 cmd 또는 cmdGit Bash로 변경하면 오류없이 실행이 가능합니다. 먼저 Ctrl + Shift + P (컨트롤 + 쉬프트 + P) 키를 눌러 Command Palette를 열고 Terminal: Select Default Shell 을 입력합니다.
VS Code에서 파이썬 코드를 작성하기 위해서는 확장자 .py 를 가진 임의의 파이썬 파일을 생성하면 됩니다. [File] 메뉴에서 [New File]을 눌러 새 파일을 만들면 됩니다. 새 파일을 만드는 것보다 C:\ 에 'korAI'라는 새로운 작업 폴더를 만들어 줍니다.
이 작업 폴더에 새 hello.py 파일을 생성하고 에디터에서 코드를 작성합니다. 그리고 해당 폴더에 저장 합니다.
print("Hello World")
 
코드를 실행하기 전에 인터프리터를 선택해야 합니다. Ctrl + Shift + P (컨트롤 + 쉬프트 + P) 키를 눌러 Command Palette를 열고 Python: Select Interpreter 을 입력합니다.
여기에 가상 환경 설정에서 지정한 koreait 폴더내의 인터프리터를 지정합니다.
koreait 가상환경을 activate 합니다.
코드 작성 완료 후 프로그램을 실행하기 위해서는 [Debug] 메뉴의 [Start Debugging (F5)] 나 [Start without Debugging (Ctrl+F5)]를 누르면 됩니다.
특히 F5를 눌러 디버깅 모드로 실행하면, 로컬변수, 콜스택 등 여러 디버깅 정보를 이용할 수 있으며, Step Over, Step Into 등의 디버거 컨트롤을 사용할 수 있다.
파이썬 파일에 코드를 작성한 후, VS Code 에디터에서 우측 마우스 버튼을 클릭 [Run Python File in Terminal] 메뉴를 선택하면 하단에 터미날 창이 생기고 파이썬 프로그램을 인터프리터와 함께 실행해 준다.
 
VS Code 권장 Extension Pack
 
반응형
반응형

python, anaconda 가상환경에서 파이썬 버전 확인 및 변경

 

VScode에서 인터프리터 연결이 제대로 안될때. 버전이 낮아서 인터프리터 실행못할때 확인 필요

 

가상환경이름을 p_pygame  이라고 가정하고.

 

0. conda  activate (가상환경명) : 가상환경 실행.

1. python -V : 파이썬 버전 확인.

2. conda search python : 사용 가능한 python list 확인.

3. conda install python=x.x.x : 입력 버전으로 파이썬 버전이 변경됨.

4. conda deactivate

5. conda activate p_pygame   : 가상환경 실행.

6. python -V : 변경된 파이썬 버전을 확인할 수 있음.

반응형
반응형

[VS Code] 인코딩 변경

VS Code 사용하다보면 웹페이지 특성상  UTF-8 또는 EUC-KR 이 있는데, 

자동으로 되어 있어도 페이지와 맞지 않는 인코딩이 선택될때가 있다. 

 

F1 키를 입력하거나, 오른쪽 하단의 인코딩 정보를 클릭하면 아래 이미지처럼 Reopne with Encoding 이 나온다. 

그러면 그 중에 맞는 인코딩을 선택하면 된다. 

반응형
반응형

https://ricardo-castellanos-herreros.medium.com/10-best-visual-studio-code-extensions-for-flutter-development-c94a4e9a7a05

 

10 Best Visual Studio Code Extensions for Flutter Development

Flutter is one of the most in-demand cross-platform UI frameworks used to develop affluent mobile, desktop, and web applications. As the…

ricardo-castellanos-herreros.medium.com

Flutter 는 풍부한 모바일, 데스크톱 및 웹 애플리케이션을 개발하는 데 사용되는 가장 수요가 많은 교차 플랫폼 UI 프레임워크 중 하나입니다. Flutter 사용자의 수가 증가함에 따라 개발자가 작업을 신속하게 처리할 수 있도록 광범위한 플러그인 및 추가 기능을 사용할 수 있습니다. 이 게시물에서는 Flutter 프로그래밍을 위해 Visual Studio Code IDE 에서 활용하는 상위 10개 확장에 대한 세부 정보를 제공합니다

 

  • Pubspec Assist
  • Error Lens
  • Flutter Tree
  • Bracket Pain Colorizer 2
  • Dart Data Class Generator
  • Flutter Stylizer
  • Better Comments
  • Color Highlight
  • Markdownlint
  • JSON to Dart Model

Flutter 앱 빌드를 위해 Visual Studio Code에서 Flutter 및 Dart 추가 기능을 이미 찾고 설정했다고 믿습니다. 그렇지 않은 경우 Flutter  Dart 용 Visual Studio Marketplace에서 가져올 수 있습니다 .

VS Code에서 확장 설치에 ​​익숙할 수 있습니다. 그러나 초보자를 위해 여기에서 설명했습니다. 왼쪽 메뉴에서 확장 프로그램 아이콘을 클릭하고 검색 상자에 원하는 확장 프로그램 이름을 입력하고 필요한 확장 프로그램을 선택한 다음 설치를 클릭합니다.

#1 Pubspec Assist

Are you tired of trying to locate the necessary Flutter and Dart packages on pub.dev? You should give the Pubspec Assist extension a go. This extension permits you to search for packages without relinquishing your editor and then appends them to the pubspec.yaml document. Moreover, it allows you to look for numerous packages simultaneously by separating the titles with commas.

#2 Error Lens

Errors and warnings are normal during development, but the methods we use to handle them are unique. In the VS Code editor, the errors and warnings are usually shown at the bottom, and we must scroll through the list to see if there are additional problems.

The Error Lens extension highlights the error lines in the code and appends the error details at the end of the line. Error icons are also displayed in the gutter.

Also, you can customize the color of the error highlight in the settings.json file. This will make your mistakes appear more enticing.

#3 Flutter Tree

It’s difficult to recognize widgets in a tree when you construct an application with a large number of widgets. The Flutter Tree extension creates the desired widget tree with simplified syntax. This makes the creation of widget trees much easier, but you have to use its own syntax to do so, which is as follows.

#4 Bracket Pair Colorizer 2

We are frequently lost in the maze of nested classes and widgets, wasting a lot of time and effort attempting to find the correct bracket pair. Bracket Pair Colorizer 2 is a lifesaver when it comes to locating misplaced brackets.

You can also customize the color of bracket pairs.

#5 Dart Data Class Generator

Often, we overlook the creation of required methods in a class. VS Code has a utility that allows you to add missing methods, but you can only add one at a time. The Dart Data Class Generator overcomes this by building Dart data classes with the constructor, copyWith, toMap, fromMap, toJson, fromJson, toString, operator ==, and hashCode methods based on class attributes or raw JSON, as the name implies.

This extension also sorts the imports alphabetically and converts them to a proper format.

#6 Flutter Stylizer

Managing a complex code repository that is not structured adequately diminishes engineer efficiency. The Flutter Stylizer extension erases this problem by organizing your methods in a consistent and opinionated way.

This tool organizes the classes within the file in the following manner:

Constructor — named constructor — public static variables — public instance variables — public override variables — private static variables — private instance variables — public override methods — other public methods — build method.

Flutter itself provides formatting choices, however, it only formats Dart files and it doesn’t re-order the code. Flutter formats the code based on these formatting rules.

#7 Better Comments

If all comments are in the same format, we won’t be able to arrange the work in order of importance, and there’s a risk of ignoring important tasks. The Better Comments extension aids in the creation of colorful comments, which makes them more readable. This makes it easier to keep track of the code comments.

All you have to do is start a comment with *, !, ?, or TODO, and it will be colored in an assigned way. You can also create your own comment styles using the settings.json file.

#8 Color Highlight

We manage an extensive selection of colors while constructing a program, yet suppose the shades we’re programming were discernible in the code editor? This would be remarkably advantageous by exhibiting the program colors without needing to initiate the program. The Color Highlight add-on makes it possible to view the colors that are specified by styling the color in our code.

#9 Markdownlint

No validators in the Flutter project can ensure the detection of problems in README.md or CHANGELOG.md documents. To remedy this, the Markdownlint plugin provides a set of guidelines to encourage Markdown file standards and uniformity. You can use this extension to check for problems locally and verify the content before publishing it live. Browse the user manualto learn more about rules.

In this image, you can see errors like multiple consecutive blank lines, heading levels should increment by one, and the list should be surrounded by blank lines. On a related note, I would like to remind you that you can preview Markdown files in VS Code by using the Preview button.

#10 JSON to Dart Model

When dealing with n amount of JSON files, constructing Dart models for each one is laborious. JSON to Dart Model creates a Dart class for the given JSON string. It’s possible to make JSON values required or default by adding r@ or d@ to your JSON key, and JSON to Dart Model will produce Dart models for you.

In the following figure, the JSON file is shown on the left, and the required classes and properties are shown on the right, which is produced from the JSON file using the JSON to Dart Model extension.

 

반응형
반응형

[VSCODE] 확장프로그램 - Auto Rename Tag

https://marketplace.visualstudio.com/items?itemName=formulahendry.auto-rename-tag 

 

Auto Rename Tag - Visual Studio Marketplace

Extension for Visual Studio Code - Auto rename paired HTML/XML tag

marketplace.visualstudio.com

Configuration

Add entry into auto-rename-tag.activationOnLanguage to set the languages that the extension will be activated. By default, it is ["*"] and will be activated for all languages.

{
  "auto-rename-tag.activationOnLanguage": ["html", "xml", "php", "javascript"]
}

The setting should be set with language id defined in VS Code. Taking javascript definition as an example, we need to use javascript for .js and .es6, use javascriptreact for .jsx. So, if you want to enable this extension on .js file, you need to add javascript in settings.json.

Note

From 1.44, VS Code offers the built-in auto update tags support for HTML and Handlebars that can be enabled with the setting editor.linkedEditing. If this setting is enabled, this extension will skip HTML and Handlebars files regardless of the languages listed in auto-rename-tag.activationOnLanguage

반응형
반응형

[VSCODE] 확장프로그램- Peacock 

작업 공간의 작업 공간 색상을 미묘하게 변경하십시오. VS Code 인스턴스가 여러 개 있고 어떤 인스턴스인지 빠르게 식별하려는 경우에 이상적입니다.

https://marketplace.visualstudio.com/items?itemName=johnpapa.vscode-peacock 

 

Peacock - Visual Studio Marketplace

Extension for Visual Studio Code - Subtly change the workspace color of your workspace. Ideal when you have multiple VS Code instances and you want to quickly identify which is which.

marketplace.visualstudio.com

Quick Usage

Let's see Peacock in action!

  1. Create/Open a VSCode Workspace (Peacock only works in a Workspace)
  2. Press F1 to open the command palette
  3. Type Peacock
  4. Choose Peacock: Change to a favorite color
  5. Choose one of the pre-defined colors and see how it changes your editor

Now enjoy exploring the rest of the features explained in the docs, here!

 

반응형
반응형

[VSCODE] 12 Unusual VS Code Extensions You Definitely Need As a Developer

You could improve your workflow, boost your productivity, and simply make VSCode prettier with the help of these extensions!

 

https://javascript.plainenglish.io/12-unusual-vs-code-extensions-you-definitely-need-as-a-developer-71a7f745d5e

 

12 Unusual VS Code Extensions You Definitely Need As a Developer

You could improve your workflow, boost your productivity, and simply make VSCode prettier with the help of these extensions!

javascript.plainenglish.io

1. Project Dashboard

Before working on a new project, you surely need to organize your previous one and make everything structured. A Visual Studio Code extension called VSCode Project Dashboard enables you to organize your projects in any possible way. You can access frequently used files, folders, and SSH remotes quickly, and pin them to a dashboard.

Project Dashboard

2. Git Graph

If you’re constantly using GIT, then you definitely need to install this extension. With Git Graph, you can easily view your history, and all your commits and manipulate them all. As you can see in the example below, you can directly access every important aspect of your repository right inside of VSCode, which is pretty useful. Even if you haven’t used Git, you should start to. It’s the easiest and best way to work with your team, and it will improve your workflow exponentially!

Git Graph

3. Toggle Zen Mode

If I knew about this extension, I wouldn’t be so sloppy in my coding and could accomplish my tasks more quickly. Toggle Zen Mode adds a new button. When you press on this button, it will activate VSCode’s Zen mode feature and remove all unnecessary clutter from the screen. In other words, it helps you to be more focused on your code and fall into a flow statement, which will significantly increase your productivity and efficiency!

Toggle Zen Mode

4. Peacock

The next extension in our list is Peacock, which has over 1.9 million downloads; however, many developers still haven’t heard of it before. It simply changes the color of your Visual Studio Code workspace. Ideal for quickly identifying your editor when you have multiple instances of VS Code or use VS Code's Remote features.

Peacock

5. Truffle

The Web 3.0 sphere and all technologies related to it, such as crypto, NFT, DeFi, and many others, are booming right now. I wrote an article about the importance of Web 3.0 in the future and why you should pay attention to it. And many developers working in this sphere are struggling with writing smart contracts on Solidity, which is a programming language for Ethereum. Truffle for VS Code simplifies how you create, build, debug, and deploy smart contracts on Ethereum and all EVM-compatible blockchains and layer 2 scaling solutions. So if you're a blockchain developer, you surely need it!

Truffle

6. Remote — SSH

The Remote — SSH extension lets you use any remote machine with an SSH server as your development environment. This can greatly simplify development and troubleshooting in a wide variety of situations. You can either develop on the same operating system you deploy to or use larger, faster, or more specialized hardware than your local machine. Also, quickly swap between different, remote development environments and safely make updates without worrying about impacting your local machine.

Remote-SSH

7. Surround

It’s a simple and powerful extension to add wrapper snippets around your code blocks. By using Surround extensions, you can upgrade your code to another level. You can wrap already existing lines and turn them into a function, a loop, a try/catch method, and many other essential methods.

Surround

8. Rainbow CSV

I hate CSV files. There’s nothing structured, and I get really bored with constant searching for specific information that I need. If you’re also struggling with these types of problems and want to make your CSV file readable, then this extension is right for you! It highlights different types of data and shows them to you in a better way.

Rainbox CSV

9. Better Comments

Better Comments is a pretty popular extension; however, I still want to add it to this list. As you might guess from the title, it helps you write better comments for your code. If you’re always struggling with default gray comments and lose focus finding the important one, then this extension is right for you. It will make your comments look prettier and will help others understand your code much easier!

Better Comments

10. Random Everything

This extension was previously covered in one of my other lists. It’s definitely for you if you frequently work with databases or simply need some random information for the test, even though I think it’s really cool. Names, numbers, and even email addresses can all be generated at random using Random Everything. So, yeah, it’s pretty cool and essential for everybody!

Random Everything

11. Resource Monitor

One of the latest extensions on the list is Resouce Monitor. There’s nothing so difficult in this extension. It just shows you some information about your system and usage. It can display CPU frequency, usage, memory consumption, and battery percentage remaining within the VSCode status bar.

12. Shades of Purple

Everyone is tired of One Dark Pro, right? Me too. So, there’s probably a better alternative to make your VS Code even prettier. It’s called "shades of purple," and yeah, you guessed right, it’s a purple color scheme for your IDE. However, there are no toxic colors, and it looks pretty nice. I’ve switched to this theme myself and am happy with the results!

Shades of Purple
 
반응형

+ Recent posts