sublime_alignment
sublime_alignment copied to clipboard
Double inline assignments?
Hi, thank you for awesome plugin. Is there a way to make sublime_alignment process such assignments
express = exports.express = require("express");
session = exports.session = require("express-session");
cookieParser = exports.cookieParser = require("cookie-parser");
to
express = exports.express = require("express");
session = exports.session = require("express-session");
cookieParser = exports.cookieParser = require("cookie-parser");
Thanks. Any help is appreciated.
Hello, have you found a way to fix this problem? I wonder to know how to do this too! Thanks!
No, and no need anymore, so no workarounds, sorry.
Using multi-selections you could:
- Select all lines
- Split selection into lines
- Use ctrl+right to jump until the first set of
=
- Align
- Use ctrl+right to jump until the second set of
=
- Align
It sounds complicated, but once you've done it once or twice it really isn't much.
Thanks! My problem is how to align two or more different characters in one line. Like this:
.m_axi_arid(m_axi_arid),
.m_axi_araddr(m_axi_araddr),
.m_axi_arlen(m_axi_arlen),
.m_axi_arid (m_axi_arid ) ,
.m_axi_araddr (m_axi_araddr ),
.m_axi_arlen (m_axi_arlen ) ,
.m_axi_arid (m_axi_arid ),
.m_axi_araddr (m_axi_araddr ),
.m_axi_arlen (m_axi_arlen ),
So I changed Alignment.py
a little.
line 121
alignment_pattern = '|'.join([re.escape(ch) for ch in
alignment_chars])
To
for alignment_pattern in [re.escape(ch) for ch in alignment_chars] :
Check if all characters in the list have been aligned.
Do you have more wise way?