Variable naming extension update.
Views (259)
I already talked about a new variable naming extension:
This extension is focused in not typing yourself an normalize variable name in complex variable declaration as records, pages, reports and so on.
I want to remark in this post a new feature in this extension, for increase usability and work speed. Instead using commands with F1 you can type a new snippet “talVaNaming”:
This helped me a lot since was done. The breakdown of snippet behavior is this:
- Type snippet (talVarnaming).
- This brings to the line “WriteTypeAndSubtype” and ”:”.
- Then you write type (record, page, etc.) and when you end writing the subtype, if is the subtype has double quotes, as “Sales Header”, the extension puts “;” automatically at then end of then line and turns “WriteTypeAndSubtype” into “SaleHeader”.
- If the subtype is a single word as “Item” or “Customer”, you must write manually the “;” character or press intro and then the snippet performs variable renaming.
The great advantage to me is that you don´t have to go back to line start to change variable naming with any action, you keep coding at the same time the variable name is changed. This improves a lot the work with variables in AL. But a told previously, is my approach, there is already a good naming extension, and you can find it more complete.
The tech side
I love to make VSCode customization popularization, because is a very exciting topic for me, and I will do a further post about how I built this snippet because is a special kind of snippet, and I want to write about the theory of this kind of snippet, how to do it, and pros and cons, for this kind of snippet. Spoiler, it´s no easy and has a dark side that could impact performance.
Comments
-
All AL developers are using snippets, unless you feel an inexplicable urge to write the same code patterns over and over again. If you want a good definition of snippet, here you are: “Code snip...

Like
Report
*This post is locked for comments