I was thinking of using Vim macros to convert aaa bbb ccc to ['aaa', 'bbb', 'ccc'] but ChatGPT showed me another way :%s/ /', '/g | %s/^/[/g | As always, ChatGPT has done much more than what I expected.