* [Caml-list] tuareg custom indenting
@ 2011-04-14 10:51 Joel Reymont
0 siblings, 0 replies; only message in thread
From: Joel Reymont @ 2011-04-14 10:51 UTC (permalink / raw)
To: caml-list
How do I add custom indenting to tuareg mode?
Assuming
let (|>) x f = f x
let (||>) x f = let () = f x in x
I get formatting like this:
while true do
ZMQ.Socket.recv sock
|> Piqirun.init_from_string
|> Request.parse
||> Request.print "-> req"
|> dispatch
||> Reply.print "<- rep"
|> Reply.to_buffer
|> Piqirun.to_string
|> ZMQ.Socket.send sock
done
Whereas I would like the |> and ||> to be aligned like this
while true do
ZMQ.Socket.recv sock
|> Piqirun.init_from_string
|> Request.parse
||> Request.print "-> req"
|> dispatch
||> Reply.print "<- rep"
|> Reply.to_buffer
|> Piqirun.to_string
|> ZMQ.Socket.send sock
done
Thanks, Joel
--------------------------------------------------------------------------
- for hire: mac osx device driver ninja, kernel extensions and usb drivers
---------------------+------------+---------------------------------------
http://wagerlabs.com | @wagerlabs | http://www.linkedin.com/in/joelreymont
---------------------+------------+---------------------------------------
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-04-14 10:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-14 10:51 [Caml-list] tuareg custom indenting Joel Reymont
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox