Van Vugt's dynamiXs

All around NAV dev and test

Comment and Uncomment Selection – v2.0

Last year was the year of (the release of) NAV 2015. A major new release bringing NAV another step forward. As before it was presented at a number of events of which I did attend a significant number. Directions US, Dutch Dynamics Community, Directions EMEA and NAV TechDays. And apart from the major part of the content they all had one striking thing in common.

Now picture yourself sitting in those rooms at these events, where various speakers are delivering their well prepared presentation. Envision what they are presenting and how the audience is reacting to that. Enthusiasm? Disappointment? Annoyance? Amazement? Or as diverse that all these emotions show up at the same time ... I recon Microsoft was quite happy with the positive (I even think enthusiastic) reception that they got for the tablet client. Surely given the effort they have put in it and the goal they want to achieve. And maybe some more other new features.

Thinking however of this one, I guess this was unexpected and ... inexpensive. If the sound level of the applause would have been measured, it by far would be number 1. And it was exactly the same on all 4 conferences. Whether Dmitry Chadayev showed it in between all the more sophisticated technical feature during the key note sessions in San Diego; or Arend-Jan Kauffmann demoed it at the Dutch Dynamic Community event in Nuland; Stuart Glasson mentioning it shortly during a O365 integration session in Poznan; or, who was it, did the same in Antwerp. In all cases the Comment and Uncomment Selection feature did rouse the audience. It surely made me laugh.

But to be honest, it also made me somewhat disappointed. As IMHO it is not complete. Surely it's great that we can (un)comment a block of code in one action and not having to use the curly brackets to do this efficiently. But I hardly uncomment blocks of code temporarily. However I do it frequently when replacing/removing existing code by new code, like in this small example:

But the Comment and Uncomment Selection feature does not support this as comment slashes are always added at the start of a line, i.e. on the first position, and not related to the indentation of the lines being commented.

So I suggest to have v2.0 for the Comment and Uncomment Selection feature by means of a setting on the Options:

Comment and Uncomment Selection – 2.0 will allow you to comment code as is now possible in NAV 2015, i.e. Comment Selection=Normal. Or (new) it will allow you to comment code in such a way that the slashes are put a the most left indentation position of the selected lines, i.e. Comment Selection=Indented.

If you agree please go to my msconnect entry and vote for it.