When typing docstring in python-mode, I always have issue with indentation. If I am at this point (|
is the cursor):
def fn():
"""
Args:|"""
If I press Enter
, the cursor will move right below the A
, and if I press TAB
, the cursor will circle between the beginning of the line and right below A
, while I want it indented:
def fn():
"""
Args:
|"""
Currently, I am just pressing SPACE
4-times (I am using 4-spaces indent) after pressing ENTER
, but I would like to know if there is a shortcut in emacs to forcefully insert an indentation (4 spaces) regardless of the mode?
I found out that M-RIGHT
inserts 4 spaces but when at the beginning of the line, it inserts 4 spaces without moving the cursor, which is pretty annoying.