Menu

Post image 1
Post image 2
1 / 2
0

I Didn't Want to Open Excel Just to Generate Sequential Numbers in VS Code

DEV Community: sql·almiraj·3 days ago
#Qk2lbNen
#dev#fullscreen#enter#exit#code#article
Reading 0:00
15s threshold

While working in VS Code, I occasionally need sequential numbers. Something like this: user_001 user_002 user_003 Enter fullscreen mode Exit fullscreen mode Or test data for SQL: INSERT INTO users ( id , name , created_at ) VALUES ( 1 , 'testA' , '2026-05-28 10:00:00' ); INSERT INTO users ( id , name , created_at ) VALUES ( 2 , 'testB' , '2026-05-28 10:00:01' ); INSERT INTO users ( id , name , created_at ) VALUES ( 3 , 'testC' , '2026-05-28 10:00:02' ); Enter fullscreen mode Exit fullscreen mode Of course, I could open Excel and use formulas. But somehow that always felt wrong. I was already in VS Code. I wanted to stay in VS Code. VS Code Is Surprisingly Weak at Sequential Numbers There are workarounds. You can use multiple cursors. You can use find-and-replace tricks. You can generate data elsewhere and paste it back. None of them are particularly difficult. They're just slightly inconvenient. And if you work with SQL, CSV files, or test data regularly, those small inconveniences show up again and again.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More