[TxMt] Re: merge mads379/align.tmbundle into source:Align Assignments command
Timothy Bates
timothy.c.bates at gmail.com
Sun Nov 18 10:34:13 UTC 2018
Thanks twould be great: one often wants the command to look out into the
line for something else to align once an initial assign is aligned. Like
commas too.
T
On Thu, Nov 15, 2018, 1:22 AM Allan Odgaard <mailinglist at textmate.org>
wrote:
> On 15 Nov 2018, at 0:43, Tim Bates wrote:
>
> For one, given this selection in an R script:
>
> #' selDVs = c("ht1", "ht2")
> #' mzData <- twinData[twinData$zygosity %in% "MZFF", ]
> #' dzData <- twinData[twinData$zygosity %in% "DZFF", ]
>
> Do you use <- interchangeably with =? So the desired result is:
>
> #' selDVs = c("ht1", "ht2")
> #' mzData <- twinData[twinData$zygosity %in% "MZFF", ]
> #' dzData <- twinData[twinData$zygosity %in% "DZFF", ]
>
> align does the right thing, and aligns the <- assignments. The built-in
> align does nothing. So having the built-in do the right thing here would be
> good.
>
> I see no issue with adding <- to the list of operators on line 9 of Align
> Assignments.
>
> The preferences system could be independent of user intervention, no? Just
> get bundle maintainers to include an align preference. Like this one for R
> And the ready-made align command in TM could inherit/import these.
>
> Since 99% of languages have the same assignment operators, it seems
> awfully redundant, and a heuristic might be smarter than a preference
> system.
>
> For example currently, the command will first check if there are equal
> characters, failing that, it will use colon.
>
> I am thinking this could be made even smarter, so it would not just check
> if the characters exist, but it will check if they are already aligned, and
> if so, jump to the next character in the list, that way, you could use
> Align Assignments in successesion, e.g. first to align assignments, then
> press again to align the trailing line comments.
>
> _______________________________________________
> textmate mailing list
> textmate at lists.macromates.com
> https://lists.macromates.com/listinfo/textmate
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20181118/87372ba1/attachment.html>
More information about the textmate
mailing list