Power Query M Text Editor Syntax Highlighting?

asjones987

New member
Joined
Feb 7, 2020
Messages
14
Reaction score
0
Points
0
Excel Version(s)
2019
Are there any editors that have Power Query M Syntax Highlighting as an option? There are times i like to copy my code out of Power Query so I can look at it for working on another file. I like to put it in an editor so it is easy to view, save etc. However not having syntax highlighting is a pain. I have at hand several editors but non support it (UltraEdit, VS Code and Notepad++)

Anyone have any ideas?



thanks


Alan
 
Hi Alan,

What version of Excel are you running on? M syntax highlighting exists natively in Office 365. I can't remember if it made it to Excel 2019 though, but pretty sure it was never present on an earlier basis.

With regards to Notepad ++, Lars Schrieber shows how you can add the libraries for that editor.

Alternately, we support colorification, editing and indentation (for most queries) in my Monkey Tools add-in for Excel. (Using my tool you don't even need to copy/paste, you just load Query Sleuth and you can edit without ever leaving Excel.) It's not true syntax checking, but it is something you may find useful if you are making light edits to your code.
 
[Typing this a 2nd time my first reply disappeared as I hit the wrong button]

Ken,

Thanks for the reply. I am running Office 365, I have used the Advanced Editor to look at the code. However when the Power Query window is up one can't open/edit other Excel stuff like other Power Query windows. I have had a few recent cases where I wanted to look at Power Query M code and use parts in another Excel Power Query. I have taken screen shots of Advanced Editor, but not as nice as having it in a normal text editor. Also I have used the trick of selecting all queries the copying/pasting and getting all the M code in once place.

Thanks for the link on the Notepad++ option. I may have to dig up Notepad++ just for that. It looks like one has to manually tweak Notepad++ every time as there is not a language file that can be copied/updated. Surprised nobody has built it for VS Code or other editors. Maybe if i can figure it out I may build a language file for UltraEdit with the Notepad++ info. Years ago i bought a lifetime license with free upgrades of UltraEdit.

I have started playing with free version of Monkey tools. There is some cool stuff in there. I saw the colorization stuff was for paid users. For my case mentioned above I think Query Sleuth would work as the dialog box is not modal although there are times when an Editor would still be nice (am I old fashioned?). However I am not sure if I can justify an annual reoccurring cost of just under$100 a year. Personally I hate reoccurring costs vs paying extra for a lifetime license but that is a different story.

thanks for the reply and information

Alan
 
I'll be honest, I actually use the Query Sleuth as my editor. One day I would like to add full on Syntax stuff in there, but honestly, the cost to build it is just too high for me at the moment. But it works well for auditing, light edits, and not locking up Excel. ;)

And I do appreciate the feedback on the pricing model as well.
 
Back
Top