I have a very long list of words like this in the Atom editor
car
cat
dog
town
I would like to convert this with Atom into an array like this:
['car', 'cat', 'dog', 'town']
It is easy to create a '
on the left of all words by putting the cursor left to car
and then pressing alt+shitf+arrow_down till one reaches town
and then pressing '
. For the right, the best thing I found is to to click at the end of each word with the mouse and pressing control till all cursors are set. Then just add ',
and backspace. This gives me
'car', 'cat', 'dog', 'town'
but its very cumbersome for a very long list. Is there a better method to this task in Atom?