也许我误解了什么是智能缩进。当我输入:
urlpatterns = patterns('some_model.views',
按下回车后,下一行会不会是人们期望“智能缩进”的地方?就像现在一样,插入符号完全没有任何缩进。
当您提供右括号时会发生智能缩进,即
urlpatterns = patterns('some_model.views',
)
# if you press 'enter' after the comma, the newline will be indented.
话虽如此,如果您正常使用自动完成功能,您应该自动获得patterns()
两个括号。插入符号将在括号内,因此当您按下 时,默认情况下会为您提供“智能缩进” enter
。
请注意,在 python 中使用字典或列表时也是如此。自动缩进将不会激活,除非您也分别有关闭}
或]
用于您的字典/列表。
我想答案必须是智能缩进在这一点上不一致。