Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to use "advanced new file" interface with "create new note" #1333

Open
Lyzod opened this issue Feb 18, 2024 · 5 comments
Open

Add ability to use "advanced new file" interface with "create new note" #1333

Lyzod opened this issue Feb 18, 2024 · 5 comments

Comments

@Lyzod
Copy link

Lyzod commented Feb 18, 2024

Is your feature request related to a problem? Please describe.

This plugin adds the abilty to create a new file and the directory if missing in one go which makes it much easier to create Notes in the places they should be. https://marketplace.visualstudio.com/items?itemName=patbenatar.advanced-new-file

Dendron and Obsidian both let you adapt this to the workflow, not leaving the program and creating everything via CLI and TUI which is more comfortable for most developers. Having to leave the program to create the folder can also produce problems with workspace. The better solution is to create folders from within VS Code.

The current use of advanced new file produces a completely empty file, so neither the new file template nor a sepcilized one can be used.

Describe the solution you'd like

A command eg "advanced new note" lets you choose a directory and creates a sub directory if it doesn't exist. New notes template applies, optionally also one you can choose.

Describe alternatives you've considered

Using Advanced new file plugin as it is, but putting the content in via a snippet is rather inconvenient and can produce errors as you have to typethe file type etc correctly.

Screenshots or Videos

No response

@riccardoferretti
Copy link
Collaborator

Do I understand correctly that basically what you are asking is that, when inputting the name of the note, you can provide a / divided path, and create it in the process?
e.g. my/subdir/The Title of my note

@Lyzod
Copy link
Author

Lyzod commented Feb 21, 2024

I think so? It creates the directory if you give it a relative path that doesn't exist. Ideally, it asks you before which existing directory the new note should be created in. You can also create the note without the extra new directory. Depends on the input. It has a nice TUI design.

@riccardoferretti
Copy link
Collaborator

The way you would achieve some of that is via templates in Foam, but I don't think that's what you are referring to.
Yet from the various cases you are describing I am struggling to get the full idea.

IIUC you would like to:

  • when creating a new note, without having set up any specific template, you would normally input the name of the note, and that would resolve based on the currently open file or root, based on configuration
  • if the name of the note contains /, it would be considered a relative (or absolute) path (instead of part of the name of the note)
  • when such "special path-title combo" is used, you would like to see where the note will be created before confirming the operation

Is that about right?

@Lyzod
Copy link
Author

Lyzod commented Mar 14, 2024

Sorry for the late continued convo. Life got in the way.

The main difference is that instead of choosing the directory by opening it and then creating a note within, you open a modal specifying the location and using the "new note" behavior in built already in foam with the templates.

I would like to have something similar to this modal/ TUI behavior:

  1. use command "new advanced note"
  2. type in directory or leave empty (root) of existing directories to choose location of the new file
  3. type in the name of the new note OR the relative path of the note (incl the name) as a divided path without needing to specify the file extension (would be cool if there was a way to override, but not necessary imho)
  4. type enter to confirm your entry

This should lead to following behavior:

If there was no divided path given, the note gets created in the chosen existing directory and the foam template gets applied.

If there was a divided part given, the new directory/folder gets created, the new note within that and the foam template gets applied.

Is that a bit clearer now what I mean? Sorry, I am not so good in explaining. I would encourage to look at the new advanced file extension documentation which also shows what I mean without you needing to install it.

@riccardoferretti
Copy link
Collaborator

Sounds good, thanks for the explanation, will keep this open to see what level of interest is out there for the functionality

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants