Post details
Advanced global cmd trick: to sort the keys inside an array of obj/hash/dict/whatever, you can pass to the global command a pattern range: :g/pattern1/,/pattern2/cmd :g/{/+1,/}/-1 sort The patterns are /{/+1 and /}/-1 (the line after "{" and the line before "}" :h :sort #vimLearn Vim (@learnvim)Fri, 25 Nov 2022 16:13 GMT














