notepad++ editing automatic indentation of Pyhton files

Source: Internet
Author: User

Transferred from: http://www.xuebuyuan.com/1102224.html

This problem has been bothering me for a long time, Python is very sensitive to indentation, generally recommended indentation with a space, and notepad++ automatic indentation is used by the Tab,google, Baidu, are mentioned in the preferences there is a tab with 4 spaces instead of options, but I have been unable to find this option, After the n version of the update is still the same, and even downloaded some plugins want to solve, but no results.

I finally found the answer in the Help document today (helping is important!!!). ), the special record of the time and forget the day.

If you want to turn on auto indent, you can set it in Settings-"preferences-"



After checking this, you will automatically indent the line, and set the tab change to 4 spaces.
Settings-"preferences-" language-"tag settings


Do not change "default", now do very flexible, can be set in different languages, we can choose Pyhton, will be removed by default, select "Replace with space"


Now your notepad++ can edit the Pyhton file very well.

Just talk about running settings, enter cmd/k C:\Python26\python.exe "$ (full_current_path)" in Run (F5) & PAUSE & EXIT, click Save, name it yourself, later in "Run" You can run your Python program under the menu .


notepad++ editing automatic indentation of Pyhton files (graphic)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.