Automatic indentation for Python in Notepad++

前端 未结 12 1773
既然无缘
既然无缘 2020-12-16 09:35

I\'ve been googling lots and this is getting really frustrating. It doesn\'t act like idle.

Example:

else:  
    name = \'World\'
    print \'Howdy\         


        
相关标签:
12条回答
  • 2020-12-16 10:32

    I played a bit with python in Notepad++ and I had a problem with the tab. Since in python your indentation is really important but notepad ++ put space instead of a tab.

    So to change to tab you need to go in notepad ++ Menu Settings > Preferences... then select Tab Settings Then select python in the Tab Settings box and uncheck Use default value and check Replace by space.

    Like the other answer, you might want to consider another ide. I personally use eclipse with the pydev plugin and django plungin. Erik is nice too.

    0 讨论(0)
  • 2020-12-16 10:33

    I found the Python Indent plugin on the official plugin page, and it worked fine!

    http://docs.notepad-plus-plus.org/index.php/Plugin_Central#P

    0 讨论(0)
  • 2020-12-16 10:34

    Emacs has python-mode which (also) does it. Grab it and prepare for life-time enjoyment.

    0 讨论(0)
  • 2020-12-16 10:36

    Well, here is a updated answer:

    Notepad++ >> Plugins >> plugin manager >> show plugin manager >> find (python indent) click install >> should be downloaded you need to reach to enable again from Plugins>>python indent>>enable

    0 讨论(0)
  • 2020-12-16 10:37

    -- For Newer Versions , Goto Settings>>Preferences>>Auto-Completion>>Auto-Indent(checkbox)

    -- For Older Versions , Goto Settings > Preferences > MISC. > Auto-Indent (checkbox)

    By the time of this post, The newest Version of Notepad++ is v7.8.7.(tested)

    0 讨论(0)
  • 2020-12-16 10:38

    I've found Notepad++ to live up to the task of being a better basic text editor than Notepad, but it isn't really designed to be as smart as a proper programming IDE.

    It might be possible to get it to do what you're asking for, but I certainly don't know how to set it up that way.

    0 讨论(0)
提交回复
热议问题