Is there a way to ignore comment lines when computing shiftwidth?
Putting the code below in a file (in an otherwise empty directory) results in a shiftwidth=2. Note that the indent in the docstring is 2, and 4 in the actual code. If you wonder why i use only an indent of two in the docstring, this was in a case where the docstring was ment as input for docopt. Below is just a short and simpified example.
"""
A docstring.
Some items:
* item1
* item2
"""
def myfunc1(a, b):
return a + b
def myfunc2(a, b):
return a - b
Is there a way to ignore comment lines when computing shiftwidth? Putting the code below in a file (in an otherwise empty directory) results in a shiftwidth=2. Note that the indent in the docstring is 2, and 4 in the actual code. If you wonder why i use only an indent of two in the docstring, this was in a case where the docstring was ment as input for docopt. Below is just a short and simpified example.