Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the efficient Python text editors?

2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly introduces the efficient Python text editor which has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to know about it.

What is an efficient text editor? In addition to his own handy use, Xiao U believes that it should also include the following features:

Highlight the structure of the code so that you can find common bug when you write the code

Contains automatic indentation function

A flag that displays the length of the code

Keyboard shortcuts for performing common operations

If you are a rookie programming novice, Xiao u highly recommends that you use an editor that has the above features and is not difficult to learn. At the same time, you'd better know something about more advanced editors, so that you will know when to upgrade and change editors as you continue to learn and enrich yourself.

Today, Xiao u will introduce several editors suitable for you according to several common operating systems:

Beginners using Linux and Windows systems can use Geany

Beginners using OSX can use Sublime Text, of course, it is also applicable to the above two operating systems

At the same time, I would also like to recommend an editor IDLE that comes with Python.

Finally, we recommend two advanced editors-- Emacs and vim.

An introduction to these editors can be found in Xiao U's previous article, "if you want to do something good, you must first sharpen its tools | recommend several Python compilers, and then let's focus on building ta into efficient editors."

Settings for Geany

1. Convert tabs to spaces

Mixing tabs and spaces in code may bring Jinan diagnostic problems to Python programs. View the indentation settings in Geany, select the menu Edit-Preference, click Editor, click Indentation to set the tab width to 4, and set type to spaces.

two。 Set the governor's flag

In most editors, you can set a visual clue, usually a vertical line, to indicate where the line of code should end. To always set this function in Geany, select the menu Edit- Preference, click Editor, click Display, make sure the long line flag is enabled, and then make sure that the system in the text box column is 79. 7.

3. Indent and undo indent blocks

To indent the code block, select menu Edit-Format--Increase Indent, press Ctrl+I; to undo code block indentation, select menu Edit-Format--Decrease Indent, or press Ctrl+U.

4. Comment out the code block

Select the menu Edit-format-toggle Line Commentation, or press Ctrl+E.

Settings for Sublime Text

1. Convert tabs to spaces

Select the menu View-Indentation and verify that the check box Indent Using Spaces. If you do not select the check box, remember to select it!

two。 Set the governor's flag

Select the menu View-Ruler, and then click the 80-character subordination Text to place a line at the 80-character sign.

3. Indent and undo indent blocks

Indent, select menu Edit-Line-Indent or press Ctrl+]; unindent select menu Edit-Line-Unindent or press Ctrl+ [.

4. Comment out the code block

Select menu Edit-Comment-Toggle Comment or press Ctrl+/

Settings for IDLE

Because IDLE is the default Python editor, most of its settings are the recommended Python settings: tabs are automatically converted to spaces; the governor flag appears at the 80 character.

1. Indent and undo indent blocks

Indent, select menu Format-Indent Region or press Ctrl+]; unindent select menu Format-Dedent region or press Ctrl+ [.

two。 Comment out the code block

Select the menu Format-Comment- Out Region or press Alt+3.

Thank you for reading this article carefully. I hope the article "what are the efficient Python text editors" shared by the editor will be helpful to you? at the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 284

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report