VBS support
Nice shot.
I wish I could use it with other languages like VBS. For instance, I can not align this VBS code block:
Dim fAnime : fAnime = 0 ' Remove Bracket and its content "[Hyogo]_Naruto_Shippuuden_143_VOSTFR_[400p]_[Xvid-Mp3]_[FADDA119](1280x720x264AAC)" will results "Naruto_Shippuuden_143_VOSTFR"
Dim fBracket : fBracket = 0 ' Replace "[]" with "()"
Dim fBrakSpace : fBrakSpace = 1 ' Put a space around brackets
Dim fComSpace : fComSpace = 1 ' Put a space after comma
Dim fDot : fDot = 1 ' Dots to spaces except for numbers & extension
Dim fExtLCase : fExtLCase = 1 ' Make extension lower case
Dim fManga : fManga = 0 ' Add "0" before volume and chapter, i.e.: "Kenichi - v2 - c8 - 01.jpg" to "Kenichi - v02 - c08 - 01.jpg"
like this:
Dim fAnime : fAnime = 0 ' Remove Bracket and its content "[Hyogo]_Naruto_Shippuuden_143_VOSTFR_[400p]_[Xvid-Mp3]_[FADDA119](1280x720x264AAC)" will results "Naruto_Shippuuden_143_VOSTFR"
Dim fBracket : fBracket = 0 ' Replace "[]" with "()"
Dim fBrakSpace : fBrakSpace = 1 ' Put a space around brackets
Dim fComSpace : fComSpace = 1 ' Put a space after comma
Dim fDot : fDot = 1 ' Dots to spaces except for numbers & extension
Dim fExtLCase : fExtLCase = 1 ' Make extension lower case
Dim fManga : fManga = 0 ' Add "0" before volume and chapter, i.e.: "Kenichi - v2 - c8 - 01.jpg" to "Kenichi - v02 - c08 - 01.jpg"
Regards
There's no plan for multi-language, because it requires me to have good knowledge about other lanauages (It would be much easier if vscode allow me to get access to the tokenized document, otherwise we need to write parsers for different languages). Thus ' might not be recongnized as comment.
It should be possible to enable aligning all found operators ( currently only one operator in the row will be aligned ). However, it might cause troubles for some language, so there might be a config to toggle the behaviour.
Well, at least the assignment should be aligned in this example, which doesn't happen. So there're definitely some bugs lying around, will look into it.
(It would be much easier if vscode allow me to get access to the tokenized document, otherwise we need to write parsers for different languages).
Is there an opened issue about that on VSCode repo?
@freMea https://github.com/Microsoft/vscode/issues/580
I voted for it
Trailing ' is being parsed as multi-line string ( because it doesn't have a matching ' on the same line). When better-align encounters multi-line string, it will consider the sibling lines are different, so it will not align them.
Removing the trailing ' will allow better-align do the job.
Unfortunately, VBS had the bad idea to use ' as comment sign 😓