What about editor vs

May 23, 2019 am 09:26 AM
vscode

What about editor vs

VScode is a lightweight editor launched by Microsoft. Its functions are similar to Atom, Sublime Text, and Vim. It can be configured into a suitable IDE.

1. Software download and installation

VScode download address: https://code.visualstudio.com/

VScode’s github project address (not used in this article to): https://github.com/microsoft/vscode

Python download address: https://www.python.org/downloads/

The author uses the win version of VScode1 .0 and 32-bit Python2.7. When installing Python, be sure to add Python to the system environment variable

2. Introduction to the VScode project structure

VScode uses projects named by folders, that is If you want to write a program, you need to create a new folder as your project. This folder contains your source files. If you need to run it, you also need to create a new .vscode folder under this folder and configure it under the .vscode folder. How this project works.

The following is a typical project structure

├─Project name

│ │ Source file 1

│ │ Source file 2

│ │ ……

│ │ Source file n

│ │

│ └─.vscode

│ │ Tasks.json

│ Settings.json

This time there are more configuration pits, vSCODE recommends changing the region to EN-US, otherwise, some ordered you must play Chinese, do not play English, Chinese show English results, play English in English, English in English, English in English, English in English, English in English, English in English, English in English, English in English, English in English, English in English, English in English, English in English, English in English, English in English, English in English, English in English, English in English, English in English, English in English, English in English, English in English, English in English. no result.

Of course, this article has not changed the region

3. Install the Python plug-in

Installing the Python plug-in can realize some functions of syntax prompts. It is recommended to install it.

Open VScode, view -->Command Panel (Ctrl Shit P), enter ext install (Chinese input: extension, then select extension: install extension), select Python in the search results that appear, and click The little cloud on the right is ready for installation.

4. Create a new project and edit source code

To create a new project is to create a new folder. The author first creates a new PythonProject01 folder on the D drive (this step is built in the system, not in VScode ), click the Resource Manager button in VScode, click the blue open folder button

Find the newly created folder on the D drive, and click to select the folder

Click the button to create a new file and fill in the file name hello.py

Enter the following code in the editing window on the right and save it

# -*- coding: UTF-8 -* -

print "Hello, World!"

print "Hello, World!"

5. Edit the task.json task file and run the program

View-->Command Panel (Ctrl Shit P), enter Tasks: Configure Task Runner (Chinese input: task, then select Task: Configure Task Runner), select Other

At this time VScode will automatically Generate the .vscode folder and generate a default task.json

Change the task.json content to the following and save it

{

// See http:// go.microsoft.com/fwlink/?LinkId=733558

// for the documentation about the tasks.json format

"version": "0.1.0",

"command":"python",

//"command":"D:\\Python27\\python.exe",

"isShellCommand": true,

//"args": ["${file}"], //This way of writing cannot be compiled

"args": ["hello.py"],

"showOutput ": "always"

}

The running method is as follows:

View-->Command Panel (Ctrl Shit P), enter Tasks: Run Build Task (Chinese input :Task, and then select the task: Run the build task (Ctrl Shit B))

The results are as follows:

Attachment: Change the language to en-US

Ctrl Shit P, Enter the language (Language), select the configuration language (Configure Language), the location.json file will automatically appear

Add "locale":"en-US" as shown below, save it

{

// Define the display language of VSCode.

// See http://go.microsoft.com/fwlink/?LinkId=761051 for a list of supported languages.

// To change the value you need to restart VSCode.

"locale":"en-US"

}

Just restart VScode.

If you want to change back to Chinese, change it to "locale":"zh-CN" or delete the location.json file.

The above is the detailed content of What about editor vs. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Will R.E.P.O. Have Crossplay?
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

What computer configuration is required for vscode What computer configuration is required for vscode Apr 15, 2025 pm 09:48 PM

VS Code system requirements: Operating system: Windows 10 and above, macOS 10.12 and above, Linux distribution processor: minimum 1.6 GHz, recommended 2.0 GHz and above memory: minimum 512 MB, recommended 4 GB and above storage space: minimum 250 MB, recommended 1 GB and above other requirements: stable network connection, Xorg/Wayland (Linux)

How to define header files for vscode How to define header files for vscode Apr 15, 2025 pm 09:09 PM

How to define header files using Visual Studio Code? Create a header file and declare symbols in the header file using the .h or .hpp suffix name (such as classes, functions, variables) Compile the program using the #include directive to include the header file in the source file. The header file will be included and the declared symbols are available.

How to set vscode How to set vscode Apr 15, 2025 pm 10:45 PM

To enable and set VSCode, follow these steps: Install and start VSCode. Custom preferences including themes, fonts, spaces, and code formatting. Install extensions to enhance features such as plugins, themes, and tools. Create a project or open an existing project. Use IntelliSense to get code prompts and completions. Debug the code to step through the code, set breakpoints, and check variables. Connect the version control system to manage changes and commit code.

vscode Previous Next Shortcut Key vscode Previous Next Shortcut Key Apr 15, 2025 pm 10:51 PM

VS Code One-step/Next step shortcut key usage: One-step (backward): Windows/Linux: Ctrl ←; macOS: Cmd ←Next step (forward): Windows/Linux: Ctrl →; macOS: Cmd →

What language is written in vscode What language is written in vscode Apr 15, 2025 pm 11:51 PM

VSCode is written in TypeScript and JavaScript. First, its core code base is written in TypeScript, an open source programming language that extends JavaScript and adds type checking capabilities. Secondly, some extensions and plug-ins of VSCode are written in JavaScript. This combination makes VSCode a flexible and extensible code editor.

How to execute code with vscode How to execute code with vscode Apr 15, 2025 pm 09:51 PM

Executing code in VS Code only takes six steps: 1. Open the project; 2. Create and write the code file; 3. Open the terminal; 4. Navigate to the project directory; 5. Execute the code with the appropriate commands; 6. View the output.

How to set vscode in Chinese How to set vscode in Chinese Apr 15, 2025 pm 09:27 PM

There are two ways to set up a Chinese language in Visual Studio Code: 1. Install the Chinese language package; 2. Modify the "locale" settings in the configuration file. Make sure Visual Studio Code version is 1.17 or higher.

What language is vscode used What language is vscode used Apr 15, 2025 pm 11:03 PM

Visual Studio Code (VSCode) is developed by Microsoft, built using the Electron framework, and is mainly written in JavaScript. It supports a wide range of programming languages, including JavaScript, Python, C, Java, HTML, CSS, etc., and can add support for other languages ​​through extensions.

See all articles