Coder Social home page Coder Social logo

jonasdoesthings / obsidian-hide-folders Goto Github PK

View Code? Open in Web Editor NEW
32.0 2.0 4.0 294 KB

Toggle the visibility of folders in the Obsidian.MD file navigator based on name-patterns

License: MIT License

JavaScript 9.10% TypeScript 90.90%
obsidian obsidian-md obsidian-plugin obsidian-vault obsidianmd

obsidian-hide-folders's Introduction

obsidian-hide-folders

A simple plugin for obsidian.md that hides configured folders, with the ability to toggle their visibility.
This can be used for hiding attachments folders when you don't need them.

Buy Me A Coffee

Installation

Search in the community plugins menu of Obsidian for "Hide Folders" look for the right plugin ("by JonasDoesThings"), there you can install the latest stable version.

Screenshot of the Plugin Installation Menu

Configuration

Enter the list of folder names to hide in the settings menu, one folder per line. You can match folders using three ways:

  • Exact folder-names (for example attachments)
  • All folders starting with a specific string (for example startsWith::_ to filter out all folders whose name starting with a _)
  • All folders ending with a specific string (for example endsWith::_trash to filter out all folders whose name is ending with _trash)

Screenshot of the Plugin Settings Screen in Obsidian.md

You can then also use a sidebar button to quickly toggle the visibility without having to enter the settings menu:

Screenshot of the Plugin's Sidebar Button in Obsidian.md

Using the command palette is also supported:

Screenshot of the Plugin's Command Palette Action in Obsidian..md

Development

Setup

  • Clone this repo.
  • npm i or yarn to install dependencies
  • npm run dev to start compilation in watch mode.

Building

  • npm run build to do a one-off build of the project, which produces the files needed for manually installing the plugin.

Manually installing the plugin

  • Copy over the outputted main.js, manifest.json from the dist/ folder to your vault VaultFolder/.obsidian/plugins/obsidian-hide-folders/.
    -> Watch Out! You cannot copy-over the raw main.ts. You need to run a build first and then copy over the produced main.js.

Support my work

I am maintaining free open source tools like this in my free-time.
If I helped you, and you want to give back, you can buy me a coffee (green tea).

License

MIT License, see LICENSE.md

obsidian-hide-folders's People

Contributors

joaoxmb avatar jonasdoesthings avatar luckman212 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

obsidian-hide-folders's Issues

Folders are unhidden after restarting the app

Hi,

First of all, thanks for your plugin!

I have encountered a situation when folders are hidden and when I restart Obsidian, the files are unhidden again. Is this an expected behavior? If yes, why? If not, is there a plan to fix it?

Thank you!

Hide files (folders) and add them to the ignore list at the same time

After a file/folder has been hidden, it remains visible in places such as Quick Switch or search despite its hidden status.
It is hoped that a feature allowing folders to be hidden and added to the system's ignore list can be implemented.
Currently, folders can be manually added to this ignore list, but if visibility is desired in searches, the ignored folder must be removed from the settings, which is cumbersome. Enabling the addition or removal of folders from the ignore list while toggling visibility would streamline the process, requiring only a single click of the sidebar button or execution of the command.
Thank you!

Broken File Explorer (Expand All)

If I have my File Explorer open in obsidian with folders and files hidden and expand everything, then it will not display any files or folders. However, If I move the obsidian window to my 32-inch monitor with Full Screen Mode, then it will still display the files and folders but not on a smaller screen or even the 32-inch monitor if it is in (windowed / border) mode.

Is there perhaps a solution to this?

Bug: Folders are only (un)hidden after refresh

After adding or removing a folder from the list of what to hide, folders aren't immediately (un)hidden. From what I can tell, folders are only hidden once you navigate to a new file or folder or something; and I couldn't find a way to unhide unlisted folders until I restarted Obsidian.

[FR]: Add prefix

Hello!
It's nice you added suffixe, but I would like to suggest "startswith". For example, all my attachment folder startswith _!

My entire file navigator is blank now

  • macOS 13.5
  • Obsidian 1.4.1
  • obsidian-hide-folders 1.0.2

When I enable this plugin, my entire File Navigator pane becomes empty/blank. I don't see any JS errors in the console. At first I thought it might be because I have ( )s in one of my ignored folder names: templates (disabled) but I removed that and just left attach as the single entry, and it's still blank.

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.