qrest
qrest

Reputation: 2417

In Emacs, how to use align-regexp to align <- and = together

I've tried, with M-x align-regexp:

<-|=
(<-|=)
\(<-|=\)
\\(<-|=\\)

And the ones with <- and = reversed. But none work?

Example code as follows:

  (flags, params, errs) <- parseArgs <$> getArgs
  let options = foldr id [] flags -- Apply functions to list

Upvotes: 4

Views: 404

Answers (2)

jsegal
jsegal

Reputation: 1271

try \(<-\|=\) -- you need the (backslashed) parentheses, and you need to backslash the |

Upvotes: 6

scottfrazer
scottfrazer

Reputation: 17327

You need to escape the |:

\(<-\|=\)

Upvotes: 5

Related Questions