Giter VIP home page Giter VIP logo

Comments (15)

VKondakoff avatar VKondakoff commented on May 18, 2024 11

Pretty surprised, that the lack of proper #tags support does note get more attention from the Foam users and developers side. Here are some images of how #tags are organised in Obsidian:
(sidebar panel)
Снимок экрана 2020-07-21 в 14 18 25

(filtering by tag)
Снимок экрана 2020-07-21 в 14 21 30

(tags autocompletion)
Снимок экрана 2020-07-21 в 14 23 50

from foam.

KJTang avatar KJTang commented on May 18, 2024 7

It's not the type of tag in my thought...

I want to tag on the file, for example, I wrote notes for movies I've watched, and tag them with tag movie,
then I may use a command to filter files with movie from all files.
It can help me quick find some certain notes.

Although it can be done with vscode search, maybe we can do more?
such as highlight them in the markdown links graph.

from foam.

picolino avatar picolino commented on May 18, 2024 4

Well, because we don't have a built-in tags support in foam I want to share how I manage them.

  1. Each tag places in a separate file name of which starts with #. Like #idea.md, #work.md etc.
  2. Each file-tag must have a file-tag name at the first line and the next lines must be empty or have a short description of the tag itself. For example - #idea.md file content:
#idea

Mark notes-ideas by this tag
  1. Use tags as plain markdown links at the end of the file or directly in note description.

I have a bunch of advantages when using this layout:

  1. Because each tag file starts with # symbol - they are displaying always-first in visual studio explorer and have alphabetical-sorting order.
  2. When I need to find related notes linked with tag - I can use backlinks to find some.
  3. Also I can see tags on graph links.

Maybe this workflow is intuitive, but I want to share it. I think it is useful.

from foam.

nixsee avatar nixsee commented on May 18, 2024 2

One thought regarding tags and graphs is instead of the tag being a node, it serves as a filter. The reason being that you'll just end up with a senseless hairball if each tag is a page/node. There could be a scrolling menu somewhere with checkboxes to filter notes that have that tag on and off. In a sense, its the same functionality as using tags anywhere else - the tag isn't a page so much as a filter for a search list.

Could also go a bit further and use set certain tags as "categories", which could have a color associated with it. Only one of these tags could be (optionally) applied to any given note.

You'd end up with a graph with various colors, likely segmented into different regions if the categories have been appropriately used. And then you can filter that graph using tags.

from foam.

riccardoferretti avatar riccardoferretti commented on May 18, 2024 1

thanks @picolino, it's a very good idea to build a convention to work around the current limitation in foam!

per @astrelochnik's comment and #288, I would suggest not using the # character though, as it has deep semantic meaning in markdown.
I like the suggestion by @ingalless (in #288) of using ~, I tested it and it doesn't break the linking/autocompletion.

from foam.

riccardoferretti avatar riccardoferretti commented on May 18, 2024 1

hi @shelper, does this help? https://github.com/foambubble/foam/blob/master/docs/features/tags.md

from foam.

jevakallio avatar jevakallio commented on May 18, 2024

You can, with Markdown Notes:
https://github.com/kortina/vscode-markdown-notes#find-all-references-to-tag

Does this do what you want? I haven't included it in the documentation since it's not how I personally use tags, but if this is helpful I'll include it in the Recipes documentation.

from foam.

lennondtps avatar lennondtps commented on May 18, 2024

@KJTang I have the same need. I would like to have in the sidebar all the tags so I would be able to filter files based on each tag.
I found this plugin https://marketplace.visualstudio.com/items?itemName=SimVet.markdown-tags where you can have all the tags from your files (tags should be like in your file like this example --> https://gitlab.com/SimVet/markdown-tags/-/blob/master/example/file3.md)

But unfortunately this plugin doesn't work very well.

Currently I use some regex search like this #(\S+)\s? to find all tags starting with # and following with a string

from foam.

KJTang avatar KJTang commented on May 18, 2024

@KJTang I have the same need. I would like to have in the sidebar all the tags so I would be able to filter files based on each tag.
I found this plugin https://marketplace.visualstudio.com/items?itemName=SimVet.markdown-tags where you can have all the tags from your files (tags should be like in your file like this example --> https://gitlab.com/SimVet/markdown-tags/-/blob/master/example/file3.md)

But unfortunately this plugin doesn't work very well.

Currently I use some regex search like this #(\S+)\s? to find all tags starting with # and following with a string

@lennondtps Yes, I used search to find tags too, but I come up with a new thought, which is we don't need tags actually.
If we create files for each tag, then other files just need link to it.
In this way, the markdown links graph can also support to display them. Maybe this is the most suittable style for tags in foam😀.

from foam.

jevakallio avatar jevakallio commented on May 18, 2024

If we create files for each tag, then other files just need link to it.

@KJTang this is how I use this actually. I have [[todo]] tags that link to an empty-ish page, and I use the backlinks from that page to browse them.

I wouldn't mind improving support for tags. I'd just need to understand, how they should work. I like @lennondtps's sidebar idea, but before I go and put that on the roadmap, I'd like to prototype it somehow to see if it's actually a good UX or now. @lennondtps, do you know of any existing app that has this?

from foam.

lennondtps avatar lennondtps commented on May 18, 2024

If we create files for each tag, then other files just need link to it.

@KJTang this is how I use this actually. I have [[todo]] tags that link to an empty-ish page, and I use the backlinks from that page to browse them.

I wouldn't mind improving support for tags. I'd just need to understand, how they should work. I like @lennondtps's sidebar idea, but before I go and put that on the roadmap, I'd like to prototype it somehow to see if it's actually a good UX or now. @lennondtps, do you know of any existing app that has this?

Sure! Zettlr and obsidian have these feature. for example: https://obsidian.md/features

from foam.

steveklabnik avatar steveklabnik commented on May 18, 2024

Roam makes [[wiki links]] and #tags be the same thing, except that they're rendered differently. Wiki links like links, but tags be with the # and in a lighter gray.

from foam.

astrelochnik avatar astrelochnik commented on May 18, 2024

Well, because we don't have a built-in tags support in foam I want to share how I manage them.

  1. Each tag places in a separate file name of which starts with #. Like #idea.md, #work.md etc.

Just to clarify for anyone who also likes this solution. For me the # at the beginning of the wiki-link breaks the ctrl+left-click "open definition" feature. You have to name your tag notes like this to get it working again: #\[tag-name].md. You then have to name your .md file "#tag-name.md" but in your workspace refer to it as [[#\tag-name.md]] (or without the ".md" depending on your settings) for it to properly ctrl+left-click. This breaks Foam and Markdown Notes autocomplete feature for creating new [[ ]] notes though.

Also, to search your workspace for tags, you press ctrl+shift+f (WIN) to search "#\[tag-name].md."

from foam.

riccardoferretti avatar riccardoferretti commented on May 18, 2024

most of this issue (which I realize covers several feature requests) has been addressed by #311

from foam.

shelper avatar shelper commented on May 18, 2024

still not sure how should i add tags to a file with #311
anyone can give an example here?

from foam.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.