简体   繁体   中英

Collapsing nonindented python code in notepad++

I am using notepad++ for wiring python code. For indented code it is possible to click the minus sign on the left side to minimize that section. For example, commands that require a indent (ie if/def/while commands) can easily be minimized down. I however have blocks of code that are all at the same indentation level that I would also like to minimize [ie be able to specify my own levels]. Given Python has specific rules for indentation, I can't see an obvious way of forcing a break. Just wondering if there is ideally a 'clean' way of achieving this, or if not, a simple way to force it.

In Notepad++ you can select code then right click and at the bottom of the menu you can select "hide lines" this may help it may not, but its just something that can help you hide code that you know works and you don't need to see any more. You can easily see the code again by clicking one of the 2 small arrows that are shown on the left hand side where the code would of been located. (Note: There is also a keyboard shortcut for this, just select the code then hit Alt + H )

Hope this Helped,

~Bobbeh

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM