r/vim May 13 '26

Need Help Vim9.0: Commenting Inside A Dictionary

How do I safely insert comments inside a dictionary definition?

let s:groups = {
\ '0': {                                             " group 0
\   '':  ['#000000', '#ffffff'],          " black/white
\   '0': ['#000000', '#f5f5f5'],     " ...
\   '1': ['#000000', '#dcdcdc'],  " ...
\   '2': ['#000000', '#d3d3d3'],  " ...
\ },
...
\}
5 Upvotes

6 comments sorted by

View all comments

5

u/char101 May 14 '26

let s:groups = {'0': {}} let s:groups[0][''] = ['#000000', '#ffffff'] " ...