unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [ruby-mode] dot-alignment support for multi-line method chaining
@ 2014-01-21 12:25 Bozhidar Batsov
  2014-01-22 13:41 ` Dmitry Gutov
  0 siblings, 1 reply; 6+ messages in thread
From: Bozhidar Batsov @ 2014-01-21 12:25 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 553 bytes --]

Currently when doing method chaining on multiple lines we get the following indentation: 

something.ala
  .one
  .two
  .three

An alternative style that seems to be popular is:

something.ala
               .one
               .two
               .three

Here are some references (not just for Ruby):

* http://en.wikipedia.org/wiki/Fluent_interface
* https://github.com/bbatsov/ruby-style-guide/pull/176#issuecomment-18664622

I guess it will be good if ruby-mode supported the alternative style via some customisable option. 

-- 
Cheers,
Bozhidar


[-- Attachment #2: Type: text/html, Size: 1833 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-01-30 14:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-21 12:25 [ruby-mode] dot-alignment support for multi-line method chaining Bozhidar Batsov
2014-01-22 13:41 ` Dmitry Gutov
2014-01-22 17:28   ` Bozhidar Batsov
2014-01-30  4:31     ` Dmitry Gutov
2014-01-30  8:51       ` Andreas Schwab
2014-01-30 14:45         ` Dmitry Gutov

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).