Excuse my emacs newbiness here, but does anybody know how to get around this? When coding in emacs, in ruby-mode, it indents to the correct level (i.e. by 2 spaces) after all the keywords, like def
, class
, module
, begin
etc, but when breaking parameter lists across multiple lines, it indents to a seemingly random position, like 40 or so columns over.
I've been reading around emacs tab settings and seem to just be going around in circles and not getting to information I'm looking for, so I figured I'd ask here.
Here's a screenshot of where it is placing the cursor in a parameter list. I've tried indenting inside of curly braces (e.g. for a block, or a hash) and that is working ok, it's the parentheses that are messing it up.
http://compgroups.net/comp.emacs/Ruby-mode-indentation-of-continuation-lines
(setq ruby-deep-indent-paren nil)
Or temporarily, within the current session:
M-x set-variable RET ruby-deep-indent-paren RET nil RET
Inside of a parentheses it will now indent like it does everywhere else. There is still a minor bug in the case of what I posted above. It indents 2 spaces further than I want it to, because I'm confusing it with the combination of (
and {
.
ruby-deep-indent-paren
and related vars have no effect for me because ruby-use-smie
is t
. Setting both to nil
didn't seem to help either :-(
But switching to enh-ruby-mode, it's working!
enh-ruby-deep-indent-paren
to nil
had an effect.enh-ruby-bounce-deep-indent
to t
allows me to press Tab again to toggle between the styles!If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With