How Do I Force 'here doc' Strings In Ruby Files To Actually Be Indented Properly In Emacs?

This page summarizes the projects mentioned and recommended in the original post on /r/emacs

InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • epub-create

    Discontinued Portable shell script for creating a minimal EPUB from a small collection of files

  • In the context of the Ruby snippet you shared, the indentation doesn't matter for what the code is doing, but in other contexts, the indentation *can( matter. For example, i recently wrote a shell script to create a minimal EPUB, which uses heredocs to create XML and XHTML files. If Emacs indented the 'headers' and 'footers' according to their position in the code structure, their indentation in the resulting files would be misleading (even though this wouldn't affect the validity of the markup).

  • mmm-mode

    New official home for mmm-mode, fixed for Emacs >= 23

  • As per /u/flexibeast’s comment, I’d argue that this is correct behavior: Emacs can’t, by default, know that the contents of a heredoc are SQL. However, with a little elbow grease, you can use mmm-mode to engage sql-mode in heredocs. There doesn’t appear to be support for this baked into mmm-mode, but I found this comment that you should be able to adapt.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • enhanced-ruby-mode

    An enhanced ruby-mode for Emacs that uses Ripper in ruby 1.9+ to highlight and indent the source code

  • All that said, a superficial search via package-list-packages with the MELPA repo enabled shows the existence of emh-ruby-mode, which might do what you require; but even if it doesn't, there's poly-ruby:

  • poly-ruby.el

    Provides poly-ruby-mode for Emacs

  • All that said, a superficial search via package-list-packages with the MELPA repo enabled shows the existence of emh-ruby-mode, which might do what you require; but even if it doesn't, there's poly-ruby:

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • A primer for users trying to make sense of Org Mode

    1 project | news.ycombinator.com | 14 May 2024
  • Exploring ASTs in Emacs with Tree-sitter

    2 projects | dev.to | 13 May 2024
  • Modern Python REPL in Emacs using VTerm

    5 projects | dev.to | 11 May 2024
  • The Emacs Window Management Almanac

    1 project | news.ycombinator.com | 11 May 2024
  • Edit PostgreSQL Databases in Emacs

    1 project | news.ycombinator.com | 9 May 2024