Double-Bracket Linking (i.e. nvALT style) [SOLVED-R20]

I find that I live inside Drafts more and more each day. For me, text doesn’t just start there, it also lives there. Drafts has become what nvALT used to be before I become an iOS first person. And one of the things I really miss and would love to see adopted from nvALT would be double-bracket linking. Functionally, I think it would be incredibly useful to have the following two features

  1. Words between [[double-brackets]] become search terms when tapped
  2. Words between [[double-brackets]] are (optionally) auto-completed

Regarding #1: Tapping text inside double-brackets would populate the search bar with that same text and initiate the search. For example, tapping [[da Vinci]] would search for all notes containing the phrase “da Vinci” just as if you entered that phrase in the search bar today.

Regarding #2: To be more useful, maybe only limit auto-complete to draft titles. So if I start typing [[da Vinci the auto-complete list only pulls up drafts which contain “da Vinci” in the actual title NOT every draft which contains that phrase. I don’t think there is any auto-complete functionality in Drafts today so #2 might be a bit of a stretch.

I know apps like Bear have this functionality. But honestly, I love the Drafts UI and how much control actions give me that I don’t want to trade that for this one feature.

hashtag dear santa

1 Like

I too was thinking only recently that this would be a ‘nice to have.’ Of course, the obvious challenge in Drafts is that there are no file names and UUIDs are cumbersome.

Personally, I still use nvALT for text files synced with Dropbox. Incidentally the [[wiki link brackets]] that you add in nvALT, now also work in 1Writer as of an update late last year. Unlike nvALT, there is no auto-complete, but nevertheless, this still works fine. Just thought I’d flag in case there were some folk that didn’t know that there is a macOS/iOS combination that supports [[wiki link brackets]] extremely cheaply - just the one-off cost of 1Writer.

Separate from the request, but you might find this Search Drafts list action useful. It will open a search in the draft list based on the currently selected text.

Thank you! I actually created a modified version of this action that does the following:

  1. If a selection is made, search for that
  2. If no selection is made but one double bracket exists, search for that
  3. If multiple double brackets exist, prompt for which one to search
  4. Else, prompt for a search term

It definitely serves my purposes for research and writing, would just like to be able to tap and have it do the same thing. Plus, when I’m writing what goes in the bracket that’s when the autocomplete would be super useful.

On a related note, is it possible to script for a temporary workspace to show the “All” section when it is run?

That looks helpful David, can you share your revised action please?

1 Like

+1: I’d also love to see this revised action, if possible…

1 Like

Fantastic idea David.

Such a tease though!

+1 to please share your modified version

1 Like

Due to popular demand (yes, I’m taking 3 requests as popular), I cleaned up the code for my double bracket search and shared it to the directory.

Link to action: Double Bracket Search

If you have feedback, please feel free to post it in the new thread I started for the action: LINK

Enjoy!!! :grin:

2 Likes

Just for info, the action directory does automatically created discussion threads for publicly posted actions.

Oh, that’s interesting! I always use the “Latest” tab when viewing the forum. What’s odd is those posts don’t appear to show up in that tab. I guess because they’re autoposts?

I think it’s probably still good to post manually if soliciting feedback though so you’re notified of any comments. But I will probably start stalking the other category too now. Thank you!

For what it’s worth, they do show up in “New”.