Release 0.3: Add default title to unsaved files in VSCode

Nathaniel Ngo
Mar 30 · 2 min read

I underestimated the amount of time I needed to look for where I needed to make changes in the code base. The original plan was to find the element that contained the tab title, extract the string in the first line of the file, and put it in the tab title.

The idea was to do something akin to this. Change the text in the label-name class element.

I found where the tab was being generated. This code seems to be responsible for rendering the tab and adding the description, but when I tried to write literal strings to test if I could change the tab title, I had problems recompiling VSCode. I should have started earlier specifically when I encountered unexpected problems such as these.

An alternative solution would be to tweak an existing function instead. There already exists a function called suggestFileName() which suggests a file name when saving. I should investigate this function further.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade