I noticed something that might be a feature, but I find it rather annoying. Say I have a piece of code:
some_function = (x, y) ->
z()
and I wish to add a new function call one indentation level deeper than the z()
. To illustrate it I will use indenting.
some_function = (x, y) ->
z()
foo()
This is with no indentation
some_function = (x, y) ->
z()
->foo()
Pressing tab once, places two spaces in front of foo()
some_function = (x, y) ->
z()
foo()
Pressing tab again does not do the expected behavior of adding two additional spaces. Instead, it de-indents back to the beginning.
Is there a way to override this?
EDIT:
Here's my relevant configuration stuff
(custom-set-variables
'(coffee-tab-width 2)
'(coffee-indent-like-python t)
)
(setq-default indent-tabs-mode nil)
(setq-default tab-width 2)
(setq tab-always-indent t)
(electric-indent-mode 1)
foo()
underz()
would cause an IndentationError because you are using an unexpected indent? Could you confirm whether or not you are trying to indentfoo()
further thanz()
? – elethan Dec 22 '15 at 17:59