atom-alignment
atom-alignment copied to clipboard
Added &-separators to enable align for Latex tables.
Interesting! I think this will have unintended consequences for other languages though. Maybe it's time to implement language-specific separator mappings? I imagine the same thing would be handy for Markdown. Any thoughts? How do you normally escape the ampersand if you want to use it normally?
I think it would be good to have default separators like: =, +=, -=,: etc. because those are quite common in all major programming languages. As you wrote an ampersand can be problematic in some languages - like HTML. In LaTex you can use the ampersand as char just by putting \ before the ampersand.
I added a possibility to add a language specific separator to this pull request in my last commit. My approach is maybe not the best, but it works. So new language/scope specified separators can be added using the syntax: {"text.Tex.latex": ["&"], "source.coffee": ["!","#"]}.
"!" and "#" in "source.coffee" scope are just for demonstration purposes.
Cool implementation. Do you think it's worth using JSON for configuration? Could be difficult to use. THe approach I've taken in https://github.com/blakeembrey/atom-dash is to tell people how to edit the config directly and using the language names instead of source name.