`cmd + click` Create a file in the same level directory instead of the root directory.
Is your feature request related to a problem? Please describe.
cmd + click Create a file in the same level directory instead of the root directory
Describe the solution you'd like
cmd + click Create a file in the same level directory instead of the root directory
Describe alternatives you've considered
A path config like "${currentFolder}"
Screenshots or Videos
This issue is a bit more complicated as various people have different expectations regarding where the note should be created. We have been looking into a paradigm to reason about it in #683 but that effort has stalled atm
This issue is a bit more complicated as various people have different expectations regarding where the note should be created. We have been looking into a paradigm to reason about it in #683 but that effort has stalled atm
Is it difficult to add a configurable item? I will keep an eye on this issue, thanks very much.
My thinking at the moment is the following:
- a configuration item with options to create the new file in the same directory or in the repo root
- the item is overridden by a
filepathproperty in the template, which must resolve to an absolute path to be used. If it doesn't resolve to an absolute path, it will ask the user to confirm the path of the item. A few variables are made available in the template to help with the resolution
Given the big amount of thinking and work @movermeyer put into spear heading this issue (in #683) and his "special interest" for templates in Foam, I wanted to include him in the resolution (although per the stalled PR I reckon he has been taken over by other things).
But thanks for bringing up the issue, I am sure several users are affected by this and would love some clear resolution rule with some level of flexibility.
Currently, we can use [[directory/filename]] to create the file in directory but not root (I'm not sure it's been designed on purpose or coincidentally).
I use the following snippet to help me create the syntax which contain directory name.
{
"New Foam Node": {
"scope": "markdown",
"prefix": "node",
"body": [
"[[${RELATIVE_FILEPATH/(.*)\\..+/$1/}.$2.md]]$0"
],
"description": "add new foam node"
}
}
Currently, we can use
[[directory/filename]]to create the file in directory but not root (I'm not sure it's been designed on purpose or coincidentally).I use the following snippet to help me create the syntax which contain directory name.
{ "New Foam Node": { "scope": "markdown", "prefix": "node", "body": [ "[[${RELATIVE_FILEPATH/(.*)\\..+/$1/}.$2.md]]$0" ], "description": "add new foam node" } }
Keyboard Shortcuts do allow for this, but I'm mainly talking about cmd + click
My thinking at the moment is the following:
- a configuration item with options to create the new file in the same directory or in the repo root
- the item is overridden by a
filepathproperty in the template, which must resolve to an absolute path to be used. If it doesn't resolve to an absolute path, it will ask the user to confirm the path of the item. A few variables are made available in the template to help with the resolutionGiven the big amount of thinking and work @movermeyer put into spear heading this issue (in #683) and his "special interest" for templates in Foam, I wanted to include him in the resolution (although per the stalled PR I reckon he has been taken over by other things).
But thanks for bringing up the issue, I am sure several users are affected by this and would love some clear resolution rule with some level of flexibility.
Looking forward to problem solving, thanks for your reply.
This sounds like a duplicate of #864
I'm facing the same issue, as I put all my notes under project home/docs folder, and whenever I control+click to create a note, it will be created under project home. Which makes the handy control+click unusable for me.
Looking for a solution for this. Thanks..
This has been fixed in 0.20.6, with the introduction of foam.files.newNotePath
This has been fixed in 0.20.6, with the introduction of
foam.files.newNotePath
Hi, it doesn't work. command + click Create a file in the root directory even if "foam.files.newNotePath": "currentDir"
Is your feature request related to a problem? Please describe.
cmd + clickCreate a file in the same level directory instead of the root directoryDescribe the solution you'd like
cmd + clickCreate a file in the same level directory instead of the root directoryDescribe alternatives you've considered
A path config like "${currentFolder}"
Screenshots or Videos
![]()
![]()
Please open a new issue for the bug
Well, it doesn't work, and I did: #1170.