Is there a way to sort map as you can sort namespace , r s n ? I tryied to define macro which uses vim :sort but it is not reliable a<return><escape>k%i<return><escape>l%jVk%k:sort<return>[Jh%kJ , also this will only sort maps where each line is simple :key :value
If you have LSP then you can use , a a, sort.
Not sure if it can be bound to some key combination.
Perhaps sort-line Emacs command may work, assuming each key/value pair is on its own line.
Sure, when key/pair is on each line I can make it work, it would be nice to have some more robust solution. Yet to explore @jahson ´s solution.