Reformatting text with Copilot
I wanted to write alt text for the following screenshot (of this page), so I could include it in this post on Mastodon.
For my alt text I wanted just the concept I was trying to illustrate - which is the number of comments attached to each of those issues.
I hit “select all” in my browser and pasted the following block of text into a new document in VS Code:
Day 9: Rope Bridge day#11 by simonw was closed Dec 9, 20227Day 8: Treetop Tree House day#10 by simonw was closed Dec 8, 202227Day 7: No Space Left On Device day#9 by simonw was closed Dec 7, 202240Day 6: Tuning Trouble day#8 by simonw was closed Dec 5, 202216Day 5: Supply Stacks day#6 by simonw was closed Dec 5, 202217Day 4: Camp Cleanup day#5 by simonw was closed Dec 4, 202214Day 3: Rucksack Reorganization day#4 by simonw was closed Dec 3, 202228Day 2: Rock Paper Scissors day#3 by simonw was closed Dec 3, 202218Day 1: Calorie Counting day#1 by simonw was closed Dec 1, 20222
I wanted to reformat this to be a list of items that looked like this:
Day 1: Calorie Counting - 2 comments
So I typed the following below:
Reformatted sorted by number, with the " day" removed and with just the title and the number of comments:
Day 1: Calorie Counting - 2 comments
Giving it an example of the first item I wanted proved essential, since it let it understand that the 2
on its own line was what I meant by “number of comments”.
I hit “tab” a few times and Copilot completed the rest of the list for me:
Day 1: Calorie Counting - 2 commentsDay 2: Rock Paper Scissors - 18 commentsDay 3: Rucksack Reorganization - 28 commentsDay 4: Camp Cleanup - 14 commentsDay 5: Supply Stacks - 17 commentsDay 6: Tuning Trouble - 16 commentsDay 7: No Space Left On Device - 40 commentsDay 8: Treetop Tree House - 27 commentsDay 9: Rope Bridge - 7 comments
Here’s what that looked like:
It also made up a suggestion for Day 10 - “Day 10: The ‘C’ Language: vb - 1 comment” - no idea where it got that idea from!