I write a lot of math and physics problems in latex files, which have numbered filenames like albn002.tex.
Often, I need to create a new file based on a file I am already editing. For this, I have to save the file under a new name, in the same directory, with the next number for which there exists no file.
Ideal would be a procedure 'saveToNewNumberedFile' so that I could assign it to something like ',stn'
Can this be programmed directly in vimscript?