Comments (13)
Hey friends (@nixsee @svsool @bs ), I was playing around with vscode-memo
and was really missing this functionality, so I created a separate plugin to create new notes: https://marketplace.visualstudio.com/items?itemName=mgmeyers.markdown-note-factory
I extracted most of the functionality from vscode-markdown-notes
with some extensions.
from memo.
I tried it out first and then switched because Memo just works better - there's a lot of glitches in the Foam extension ecosystem right now. Longer-term I'll likely switch back to Foam, as I like what they are planning regarding MDX, publishing with Gatsby, and other ideas.
Thanks for the answer! Good to know.
- Slugify filenames, but (automatically?) use Spaces in Titles and Link Labels (#16)
It can be considered if it receives enough upvotes.
- Create New Markdown Note command that applies appropriate formatting to filename (this issue)
- Create New Markdown Note from selected/extracted text command
- Send selected text to existing note
I think these three might be beneficial to implement as separate plugins so that other users who don't use Memo could utilize them as well. In general, these commands should be quite generic and don't require Memo's context. I'd like to keep Memo as less opinionated as possible and provide individual enhancements that don't require Memo's context via other plugins.
Also have you tried https://github.com/monferrand/mzettel?
I think it already has filenameTemplate
& notesTemplate
which you can use for creating new markdown notes in a way you described it.
Btw I did not find "New Markdown Note" command in foam's core.
There is only "Open daily note":
from memo.
Sorry, I forgot to respond! I'll look into using snippets for some of my needs. I'll probably also look into using a text expander application as well. mzettel didn't really work for my needs - I've submitted some issues there though.
I see you have another repo now for extracting text to new or existing notes - I look forward to seeing it come to fruition!
Overall, I'm loving Memo so far! I just discovered the Rename Symbol function - amazing!
from memo.
Hi,
Thanks for the feature request!
I am coming from Foam
If you mind to answer: just trying out Memo or something particular made you switch?
I am coming from Foam and this is a very useful function as I don't always want to create a note from a new link.
I think a similar feature was discussed in #24 and we realized that built-in file explorer and new file action are more flexible for this purpose.
From one of your repos I can see that you use "File Utils" extension, do you think File: New File
is missing something compared to what you suggested?
Not related but interesting that macros which you implemented in this repo was mentioned not so long ago :). See "extract to note".
from memo.
I tried it out first and then switched because Memo just works better - there's a lot of glitches in the Foam extension ecosystem right now. Longer-term I'll likely switch back to Foam, as I like what they are planning regarding MDX, publishing with Gatsby, and other ideas.
What I'm missing from Foam/Markdown Notes is the Create New Note command that will automatically slugify the filename with "-" (which has been suggested in #16 ), adds .md (which, I don't think File: New File can do automatically), and adds a # header for the title (without the "-"). So, I suppose beyond just automatically adding .md, this is part of a larger request regarding how filenames, titles and link labels are handled...
I only use the File Utils extension as part of the macro that you mentioned that allows me to select some text to extract into a new file and add some formatting - the File Utils has a command "fileutils.fileCopyName". I'm not smart enough to make a fancier/smoother command, and the macro didn't work with the Markdown Notes Create New Note command. If you know how to make this, that would be fantastic as well! I use it extensively.
Sorry, I suppose there's a lot of ideas/requests in this one issue! I can create a few different issues if you like.
Summary:
- Create New Markdown Note command that applies appropriate formatting to filename (this issue)
- Slugify filenames, but (automatically?) use Spaces in Titles and Link Labels (#16)
- Create New Markdown Note from selected/extracted text command
- Send selected text to existing note
from memo.
Thanks for the response and I understand it all! If I knew how to make extensions, I would make one for these commands myself. But I don't, so I have my clumsy macro for it!
mzettel looks very promising - I like how it allows the user to make a template rather than have a hard opinion on how the new page would look. You could also probably make different templates for different types of notes.
Perhaps this is a solution to our problem? Memo could either internally allow for custom user-templates, which the user can choose to use or ignore. You could even have a list of templates to choose from, for different types of notes, in the command's input prompt.
Yet, I appreciate that you would prefer to have such functions be in their own extension, like mzettel, for anyone to use. If this is the case, would it be possible to add some sort of configuration setting to allow a user to override Memo's new note function and point to an external extension to handle this?
I suppose this would be specifically useful/necessary for when you create a new note by clicking a [[new link]]. At the very least, could you point me to where in the Memo code I could do this sort of override myself?
Regardless, I'll try mzettel out later today to see if it works for my needs - both new notes, as well as perhaps even with my macro for creating a new note from a selection.
New Note is from the Markdown Notes extension that Foam uses - so far they have a similar ethos as you of keeping the core as non-opinionated as possible (and they're actually even more extreme with this, as Foam Core doesn't really do very much yet) and the user can use extensions to fill in their needs.
from memo.
Perhaps this is a solution to our problem? Memo could either internally allow for custom user-templates, which the user can choose to use or ignore. You could even have a list of templates to choose from, for different types of notes, in the command's input prompt.
I think custom templates are not needed and snippets could be used.
Yet, I appreciate that you would prefer to have such functions be in their own extension, like mzettel, for anyone to use. If this is the case, would it be possible to add some sort of configuration setting to allow a user to override Memo's new note function and point to an external extension to handle this?
If Memo does not do any magic on note creation such as templates handling, then snippets can be used instead. I believe they are more flexible.
At the very least, could you point me to where in the Memo code I could do this sort of override myself?
Sure, here you go.
Contribution guidelines are here.
Regardless, I'll try mzettel out later today to see if it works for my needs - both new notes, as well as perhaps even with my macro for creating a new note from a selection.
Did you like it?
New Note is from the Markdown Notes extension that Foam uses - so far they have a similar ethos as you of keeping the core as non-opinionated as possible (and they're actually even more extreme with this, as Foam Core doesn't really do very much yet) and the user can use extensions to fill in their needs.
Thanks, good to know!
from memo.
Yesterday, I discovered auto-snippet extension, which executes configured snippets on opening empty files.
from memo.
Thanks, I'll take a look!
from memo.
Independent of the slugs in filename discussion, File -> New File feels unwieldy.
An example!
File -> New File
Type a header, let's say # testo
File -> Save
I'm prompted for a file name for the note, autofilled with # testo
It defaults to the folder which last had focus, so must check I'm in the root directory (or otherwise).
Perhaps a light-weight interface to create a new note through the cmd palette would compliment creating a note inline, without breaking the ideal of keeping things as metal as possible?
Thanks for the amazing work!
from memo.
@mgmeyers, looks really nice at first blush. I am really encouraged by the composable approach everyone is taking. Is this a common pattern in VSCode extensions?
from memo.
@mgmeyers Woah! Looks like exactly what I needed a few months ago! I still have plenty of refactoring left to do, so I look forward to testing this. Thanks!
from memo.
Seems different solutions were proposed as part of this issue, so hopefully no need to implement it as part of Memo.
from memo.
Related Issues (20)
- Feature Request: Templates HOT 2
- FR Extract range to new note should insert wikilink HOT 3
- Reference header name with code HOT 1
- New notes capture links to old notes with same name HOT 2
- Backlinks in Preview HOT 3
- Not all extensions are open with default app
- Link to .ts / .tsx /.js files & links inside them also
- markdown.experimental.updateLinksOnFileMove.enabled HOT 4
- Daily notes don't automatically create in a Journal or Daily Notes folder HOT 1
- Request for adding to HacktoberFest Topic HOT 1
- Better logging for commands in general HOT 4
- Feature Request: Checklist / Todo / Tasks HOT 3
- A solution compatible with Markdown Extended
- CMD+Enter keyboard shortcut HOT 1
- Feature Request: Sort Backlinks Sidebar
- YAML Preamble is displayed in on-hover preview, not in built-in preview
- Daily Notes Folder Configuration HOT 1
- Add tag function?
- Completion Sort Order: Frequency/Recency
- Incompatible with Markdown Preview Enhanced
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from memo.