Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6842403
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T00:05:47+00:00 2026-05-27T00:05:47+00:00

In Emacs, using ruby-mode, I can’t find a way to stop this happening: foo

  • 0

In Emacs, using ruby-mode, I can’t find a way to stop this happening:

foo = if something?
        42
      else
        7
      end

When our in-house conventions are:

foo = if something?
  42
else
  7
end

(Same goes for begin..end and case..when).

Also, while it’s less of a nuisance, our convention for case..when is to indent each when.

case whatever
  when foo
    "a"
  when bar
    "b"
  else
    "c"
end

I know people generally say you should align the when with the case, but it’s not the convention of our company, so does anybody know how to customize this too? I can find very little customization for ruby-mode. The only thing I’ve really been able to customize is the indentation inside parentheses.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T00:05:47+00:00Added an answer on May 27, 2026 at 12:05 am

    There is no way to customize this. ruby-mode is pretty barebone as far as indentation customizations are concerned and Matz (its original author) is totally adamant in supporting the standard style for case indentation.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Say you write some code like this (using ruby-mode, but I've seen this happen
I am using Emacs 23 and php-mode.el 1.5.0. When I have this in my
I'm using Emacs with C# Mode and when I turn on the speedbar, no
I am using emacs in Ubuntu. How can I remap META to the ALT
I'm using emacs tramp mode to remotely edit files over ssh. The problem is
I'm using Emacs with clojure mode and slime connected to a swank server produced
Possible Duplicate: Using Emacs to recursively find and replace in text files not already
I started using ruby-electric-mode. I like it except that I am used to closing
I'm looking to disable (or customized) tab completion in emacs Ruby on Rails mode,
I am using emacs I find that sometimes I have 2 files separated into

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.