Timeline for How to right-align with align-regex?
Current License: CC BY-SA 4.0
11 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jun 7, 2022 at 8:15 | comment | added | Tobias | @ychaouche Note also, that \s- depends on the syntax table of the major mode of the current buffer. | |
| Jun 7, 2022 at 7:58 | comment | added | Tobias | @ychaouche Please use Emacs to check the regexp. E.g., paste the text into the scratch buffer and call re-builder. Set reb-re-syntax to string via C-c TAB (you can use TAB-completion there) and paste the regexp from the question within the quotes "". | |
| Jun 5, 2022 at 16:23 | comment | added | ychaouche | @Tobias, I wonder what that regex matches though. See imgur.com/a/I9bPjqp and regex101.com/r/T8WR7u/1. First line isn't captured on regex101, but it still works correctly on emacs for the whole buffer (including first line). There are no spaces before the & in my example, so it must have taken it from previous line, assuming something with newlines has to match? | |
| Jun 5, 2022 at 16:04 | comment | added | ychaouche | @Tobias wonderful! | |
| Jun 5, 2022 at 15:59 | vote | accept | ychaouche | ||
| Jun 2, 2022 at 14:20 | history | edited | Tobias | CC BY-SA 4.0 | added 227 characters in body |
| Jun 2, 2022 at 13:19 | comment | added | Phil Hudson | This incredible working answer should absolutely be accepted and upvoted! | |
| Jun 2, 2022 at 10:00 | history | edited | Tobias | CC BY-SA 4.0 | added 1 character in body |
| Jun 2, 2022 at 10:00 | comment | added | Tobias | @ychaouche Sorry, I used your last example for testing (first left-aligned everything and applied align-regexp afterwards). I have adapted the regexp for your first example now. Could you try again? | |
| Jun 2, 2022 at 9:23 | comment | added | ychaouche | regex : \([[:alpha:]_]+\s-*\), group -1, spacing 1, repeat : n, result : gist | |
| Jun 1, 2022 at 17:03 | history | answered | Tobias | CC BY-SA 4.0 |