Emacs bulk indent for Python

前端 未结 8 1244
星月不相逢
星月不相逢 2021-01-29 17:37

Working with Python in Emacs if I want to add a try/except to a block of code, I often find that I am having to indent the whole block, line by line. In Emacs, how do you inden

8条回答
  •  -上瘾入骨i
    2021-01-29 18:29

    Do indentation interactively.

    1. Select the region to be indented.
    2. C-x TAB.
    3. Use arrows (<- and ->) to indent interactively.
    4. Press Esc three times when you are done with the required indentation.

    Copied from my post in: Indent several lines in Emacs

提交回复
热议问题