Closed phelma closed 6 years ago
This looks great. Thanks for the PR @phelma!
I'm going to pull it down and test it out. Can you update the Readme with the new functionality? Maybe stick a new section above ### File Path Detection
with instant note, what it does, and what users should know?
Yes, I will have a look this evening.
Its a bit rough and not very DRY. (my first VSCode extension code)
We could perhaps just make it a config option to skip the file naming part of the new note command?
Yeah, it would be a lot cleaner to extract line 36-64 of newNote.js into a separate function that takes a note name as a parameter.
Then you can easily export it from newNote.js
and use it in instantNote.js
.
One thing is that there should probably be a setting associated with this feature as well so a user can set the path and any tokens they want in the setting and it'll get replaced whenever they generate an instant note. So perhaps of taking a fully formed file name in this extracted function, you can grab the setting from the configuration (see lines 11 - 17 newNote.js) and pass it into replaceTokens and continue on from there.
I like the idea!
Whoops, closed this by accident
I hope you don't mind @phelma but I added a setting for default note name and pre-populated the create new note functionality so one can easily create a new note.
https://github.com/patleeman/VSNotes/pull/18/commits/ba6d07c049ae7fc9ecdf37c447365f5cf16bad62
Going to close this because the functionality is pretty close.
Instant note skips the filename part, for even quicker note taking!
16