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.