SublimeText / AdvancedNewFile

File creation plugin for Sublime Text

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature - Default Name while creating or renaming with current date/time

nanocent opened this issue · comments

Hi, one of the use cases I encountered is that we take down raw notes in a new sublime tab but then these tabs are cluttered with very less visibility about when they were created.

Therefore, it would be great if we could add the default file name option as well while creating or renaming the file.

Hi @nanocent, apologize for the month (!) delay in replying. I don't actively maintain this anymore. However, is the default_initial the setting you're looking for? The string you place in that value will populate the initial input.

As a workaround, you may use the commands provided by https://packagecontrol.io/packages/InsertDate via key bindings to insert the current date into ANF's "New File" input panel.

Since that package is way more flexible and I could see different use cases for similarly complex default file names, I'd rather provide the ability to specify commands to be run on the input view rather than adding the ability to use a formatted timestamp in the template. This would also allow inserting snippets with fields using the insert_snippet command, for example (or the chain command to execute multiple commands, assuming that works properly for input views).