Please Note: I know how to turn the automatic newlines at the end of files on and off -- generally -- in Visual Studio Code. What I want is very specific way to change this behavior on demand.
I have set the defaults in VS Code to put newlines at the end of all files on save following the instructions here. However there is one file where this automatic newline breaks how the file works. Worse still, the file is of a file-type where usually I do want a newline at the end of the file. (If you care: it is an HTML file that the Hugo SSG uses to modify the behavior of the Markdown processor.)
What I am looking for is a way to be able to save this one particular file, without an automatic newline, by some keyboard shortcut or other easy to do bypass. What I have to do currently is go into the settings and turn off what is the preferred behavior for all other files, save the problematic file, then turn the defaults back on.
This may be too much of an edge case to fix easily with a shortcut, but it seems like something similar could come up enough that someone may have fixed it.