Option to create a new note in the current directory

If there’s any better ideas please discuss! I don’t think I can cover all cases so there’s definitely some good ideas I miss.

@Licat Choosing to create a Note to the current directory on a per instance basis sounds pretty useful for those of us who do directory organization. It means there’s less to drag’n’drop later. @Valery_Kondakoff made a really good point against my earlier suggestion to add some prefix to the filename. That it would cause naming issues, which is probably true. But what if something like
[-[New Note]]
was recognized by Obsidain to save in the current directory instead of the default directory. Seems like key combinations like that are pretty easy to program, as there are already quite a few of those. Also, I’m pretty okay with how Notes are currently saved. It would just be a nice bonus to have an easy per-instance option.

@WhiteNoise Whew! That would be interesting to experiment with, specifically because it’s out of my comfort zone. But I really don’t see how it’s a benefit. It seems to me that the overhead of having to do extra backlinking and creating additional index notes or table-of-content notes is more work than dragging notes into a basic file structure. And it seems so easy for too many Notes to get lost in the rubble without any attention given to keeping a simple, clean file structure. But I remain curious. @WhiteNoise, do you have any links to literature that elaborates on the philosophy of ignoring order on that level? I like to at least try being open to different paradigms.

You can use the “Root” option if you don’t want to use any folders!

While all the files in the same folder and using labels is one way to do knowledge management, you could easily get file clashes, and to avoid this you need to name the files with a prefix or some other name space which makes the names not directly usable as links without using a second display name for the links.

I really like @goodsignal idea to have some extended syntax for internal links.

What about this:

  • we have three options in the Preferences: “Root”, “Same folder”, or “Specified folder ____".
  • we can use default syntax [[internal link]] for the option currently set in Preferences.
  • each of these three options has it’s own syntax: say, [[/internal link]] for Root, [[.internal link]] for Same folder and [[~internal link]] for Specified folder.
  • and, of course, we can specify the exact note location by specifying path: [[./subfolder/internal link]]

Usage examples:

If the Preferences are set to Root, use [[internal link]] to save note in root, [[.internal link]] to save note in the same folder and [[~internal link]] to save note in the specified folder.

If the Preferences are set to Same folder, use [[/internal link]] to save note in root, [[internal link]] to save note in the same folder and [[~internal link]] to save note in the specified folder.

If the Preferences are set to Specified folder, use [[/internal link]] to save note in root, [[.internal link]] to save note in the same folder and [[internal link]] to save note in the specified folder.

What do you think? If this sounds too complicated, I’m pretty happy with just a hotkey to quick toggle between the three available options in the preferences. :slight_smile:

1 Like

Just to be clear, I’m proposing that Obsidian handles the autotext and saving location. But not creating a new markdown syntax. Entering [-[ in Obsidian would result in the normal [[]] auto-text showing in the Edit body. But Obsidian would create the new note in the current directory for this link. The same process would work for creating links from highlighted text.

  1. Highlight New Note
  2. Type [-[ macro
  3. Get a New Note saved in current directory
  4. See [[New Note]] in Edit body

If options for “Root”, “Same folder”, or “Specified folder ____” are implemented, the macro behavior should do the opposit of the default setting to maximize utility. i.e.

  • Root or Specified folder is set as Default, then [-[ saves in current folder.
  • Current folder is set as Default, then [-[ saves in Root folder

I’m sure the devs are capable of anything :wink: but I’m suggesting the idea that the alternate indicator is between the two left brackets. It just seems easier to parse than any variations in the Note Title area. If Valery’s notation were used, I’d just shift the variation out of the Title and into the bracket macro

  • [[ -> root folder
  • [/[ -> same folder
  • [~[ -> special folder
    (I only picked [-[ because the dash is the closest key for speed)

Or maybe user selected key combinations will be added as a settings feature in addition to keyboard shortcuts :slight_smile: And these would be in the list of customizable macros. I’m sure this feature would also help Obsidian users who are avid MediaWiki contributors. They could set === to auto-generate ### and not worry about retraining their muscle memory.

Another option that’s likely simple to implement and may satisfy Valery, would be to just make the Link Suggestion box a little smarter. Maybe this is what Valery was suggesting and I didn’t understand. But

  • [[./ would automatically put Path/To/Current/Working/Directory/ at the top of the list
  • [[~ would automatically put Special/Directory/Location at the top of the list
  • [[p/t/s/d would automatically put Path/To/Specific/Directory at the top of the list as the closest intelligent match to an existing directory tree :laughing:

And Obsidian would simplify the [[Note Title]] after the link is created as it currently does, unless there’s a duplicate and a parent directory is required for singularity.

It seems problems would arise when creating links from highlighted text that the macros above would handle gracefully. But maybe this easily attainable half-solution would be enough.

I like that as it’s an easy way to extend the location via command keys. For final presentation of the link those special characters are then omitted.

1 Like

The program can pop up a window to disambiguate if the text matches more than one file.

Good to see this feature in v0.6.3. Thanks!

1 Like

If it’s working as expected I’ll archive this. Thanks!

It is. At least as I expected! Thanks!

1 Like

Got it! Although I’m a bit nervous about moving a long thread like this into archive, it’s not locked so anyone can still @ me or open something new and link to here if they feel like this shouldn’t be archived.

Great discussion guys!

Agreed.

Though, IMHO github issues or some such interface is much better for keeping track of bugs & features & blue sky ideas. You can have long drawn out discussion there as well + you can keep track of the state.

Any update on this feature request?

there is an option now to create a note in the same directory of the file you are currently editing.

1 Like

just noticed it. thanks a lot :slight_smile:

Personally, I don’t think it is a good idea to use folders to express (and enforce) a hierarchical organization (especially a deep hierarchy).

A bit late to the game here, but why don’t you recommend this? This is my preferred way to structure my notes so i’m interested if there are technical reasons/limitations not to do this (ie. search will become slow as more files are created, etc)

@DenHolland
one of the reasons: Some software is not able to manage excessively long paths, which can lead e.g. to data loss, inability to open or rename files/folders, … (Experienced by myself)
Discussed in:

1 Like

Thanks for in info! I’ll read through these resources. Had no idea that max path length was a thing. Not only for the OS, but software like OneDrive has a limit of 400 (well under mac os limit of 1024). Could easily see how not knowing this could lead to a very hard to track down issue