In certain modes, such as Python
I have noticed that Emacs will not indent how I want it it to.
It is getting "smart".
For instance, in this block of code:
def vec_select(veclist, k):
"""Return a sublist of veclist consisisting of the vectors v in veclist where v[k] is zero
Args:
veclist: A list of vectors over the same domain
k: An element of the domain
#RIGHT HERE
"""
I am unable to double indent (where #RIGHT HERE
is written).
Going to the beginning of a line and pressing tabs makes the text flush with "Args" (one indent) but pressing TAB
again unindents (to the beginning of the line).
I find this behavior very annoying. When I press TAB
I want to indent (regardless of what mode I am in).
Is there a way to force this?
TAB
that will cycle through all possible indents. This is not ideal for docstrings. A good solution to your problem would be to have Python mode docstrings to override the mode's default indentation function to do something that makes more sense in that context. I could try to write up some code to do that, but it will take time... (possibly, not today), so this isn't a complete answer. Anyways, typingSPC
four times is annoying, but solves the problem in the end. – wvxvw Nov 6 '17 at 10:07C-q
followed by the desired character, soC-q TAB
in your case. – wvxvw Nov 7 '17 at 6:46