From: Rasmus <rasmus@gmx.us>
To: 20896@debbugs.gnu.org
Subject: bug#20896: 25.0.50; [js-mode][FR] support chain syntax indentation
Date: Thu, 25 Jun 2015 17:37:51 +0200 [thread overview]
Message-ID: <87a8vnlrxs.fsf@gmx.us> (raw)
Hi,
I would be lovely if js-mode would support the chain-syntax used by the
d3.js library. d3.js is used to making svg graphics. The syntax is very
readable if indentation is right:
var points = svg.selectAll(".scatter-dots")
.data(data)
.enter().append("path")
.more_funs();
var an_axis = axes.append("g")
.call(d3.svg.axis()
.scale(Scale)
.orient("bottom"));
Usually calls are factored out so the latter example is not so important
to be able to match. Just aligning on the first dot on the previous line
would be a big step forward.
I don't know if this is useful for other JS libraries than d3. Some d3
documentation mentioned this selector-mechanism was inspired by jQuery,
but I don't know this library well enough to say whether it would be
useful with that.
Thanks,
Rasmus
--
Not everything that goes around comes back around, you know
next reply other threads:[~2015-06-25 15:37 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-25 15:37 Rasmus [this message]
2015-06-26 0:14 ` bug#20896: 25.0.50; [js-mode][FR] support chain syntax indentation Rasmus
2017-01-10 6:29 ` bug#20896: patch to add chained indentation Tom Tromey
2017-01-12 1:57 ` Dmitry Gutov
2017-01-12 4:01 ` Tom Tromey
2017-01-13 1:09 ` Dmitry Gutov
2017-01-14 17:45 ` bug#20896: done Tom Tromey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87a8vnlrxs.fsf@gmx.us \
--to=rasmus@gmx.us \
--cc=20896@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.