Home > Backend Development > Python Tutorial > Basics of getting started with Pycharm: Using Pycharm as an editor

Basics of getting started with Pycharm: Using Pycharm as an editor

Y2J
Release: 2017-05-12 10:54:44
Original
4502 people have browsed it

This article mainly introduces the sixth part of the most complete Pycharm learning tutorial in detail. Pycharm is used as a Vim editor and has certain reference value. Interested friends can refer to it

Pycharm is used as a Vim editor. The specific content is as follows

1. Theme

If you are a fan of Vim and do not plan to use other types of editors , then this tutorial will be more suitable for you. Here we will introduce in detail how to download, install and use Vim with the help of Pycharm IdeaVim plug-in. As for Python programming and the use of Vim, see the official website and Vim documentation for details.

2, Preparation work

Install Pycharm 2.7 or higher

3. Download and install IdeaVim Plugin

Click the Settings button in the main toolbar of Pycharm, and select the Plugins page under the IDE Settings interface. All plug-ins installed under the current platform will be displayed. However, IdeaVim is not among them. At this time, you need to click the Browse JetBrains plugins button and type vim in the Search column to find the corresponding plug-in:

Install the plug-in:

You can use it after restarting Pycharm:

4. Changes after restart

Both Vim and Pycharm are text editing software based on keyboard input. The shortcut key settings of the corresponding IdeaVim plug-in are likely to conflict with the shortcut key settings of Pycharm, which is why Pycharm needs Re-create a Vim version of the shortcut key scheme based on the existing shortcut key configuration.

When Pycharm restarts, you will see the Vim Keymap settings dialog box, where you can select a shortcut key configuration scheme. As the shortcut key scheme in the current Vim environment:

We select the default configuration here, click OK, and you can see that Pycharm has created a new shortcut key configuration:

Next, check the shortcut key setting interface again. Click the Settings button to enter the Settings dialog box, and click the Keymap page under IDE Settings. In the corresponding shortcut key configurationdrop-down list, a solution name named Vim will appear, which defines some default shortcut key combinations, such as Ctrl+V for paste, etc.:

However, there is a more important Pycharm interface setting. Click Tools in the main toolbar, select the Vim Emulator command:

When you install the IdeaVim plug-in, this command is selected by default (there is a check mark in front of it), which means that the current Vim emulator is available. If you uncheck it, Pycharm will return to the normal shortcut key state; if you check it again, Pycharm will reload the Vim version of the shortcut key configuration plan:

5, Edit mode

Now, we can edit in Vim mode. At this time, our input cursor is a small black block, which means we are currently in Normal mode:

If you want to change to Insert mode, press the i key and the cursor will change to a vertical line:

In this mode, you can enter new codes or modify the current codes. Of course, you can also choose other modes, such as pressing the r key to enter Replace input mode.

By the way, in order to quickly enter Vim simulation, you can view the relevant prompt information in the Status column: Status bar

## Press the Esc key, Return to normal editing mode.

IdeaVim has many features of the VIm editor, such as abbreviations, shortcut key combinations, various commands, etc. For details, see: a lot more.

【Related recommendations】

1.

Python free video tutorial

2.

Python basic introductory tutorial

3.

Application of Python in Data Science

The above is the detailed content of Basics of getting started with Pycharm: Using Pycharm as an editor. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template