使用align-regexp对列进行右对齐

bit*_*eps 5 regex emacs alignment

我尝试使用align-regexp对齐某些内容,但无法获得所需的行为.

这是我最初的所作所为:

  [21:26] <Luke-Jr> btcNeverSleeps: no
  [21:26] <dmanderson> Not if it has to wait to make it into the block
  [21:26] <btcNeverSleeps> Luke-Jr: can you develop a bit?
  [21:26] <Luke-Jr> btcNeverSleeps: Bitcoin is a currency, not an authentication system
  [21:26] <dmanderson> your user could be waiting a LONG time for 1 Satoshi to who up
  [21:26] <Luke-Jr> btcNeverSleeps: you can use signed messages though
Run Code Online (Sandbox Code Playgroud)

这就是我想要的:

  [21:26]        <Luke-Jr> btcNeverSleeps: no
  [21:26]     <dmanderson> Not if it has to wait to make it into the block
  [21:26] <btcNeverSleeps> Luke-Jr: can you develop a bit?
  [21:26]        <Luke-Jr> btcNeverSleeps: Bitcoin is a currency, not an authentication system
  [21:26]     <dmanderson> your user could be waiting a LONG time for 1 Satoshi to who up
  [21:26]        <Luke-Jr> btcNeverSleeps: you can use signed messages though
Run Code Online (Sandbox Code Playgroud)

这是我使用"align-rexegp RET> RET"得到的:(这不是我想要的)

  [21:26] <Luke-Jr        > btcNeverSleeps: no
  [21:26] <dmanderson     > Not if it has to wait to make it into the block
  [21:26] <btcNeverSleeps > Luke-Jr: can you develop a bit?
  [21:26] <Luke-Jr        > btcNeverSleeps: Bitcoin is a currency, not an authentication system
  [21:26] <dmanderson     > your user could be waiting a LONG time for 1 Satoshi to who up
  [21:26] <Luke-Jr        > btcNeverSleeps: you can use signed messages though
Run Code Online (Sandbox Code Playgroud)

可以用简单的方式完成我想做的事情,align-regexp还是应该研究一些更高级的东西?(例如,我知道我绝对可以使用宏来完成它,但我首先想知道是否可以使用简单的正则表达式完成).

bnb*_*ith 8

align-regexp功能没有很好的记录.在这种情况下,您实际想要做的是使用Cu Mx align-regexp

然后,按照提示确保输入-1来证明捕获组的合理性.

使用regexp进行复杂对齐: (<[^>]*>)

要修改的括号组(如果为负则证明合理): -1

间距量(或列为负值):1

重复整行?(是或否):是的