Skip to content

Commit

Permalink
docs: add folder-specific previewer and preloader tip
Browse files Browse the repository at this point in the history
  • Loading branch information
sxyazi committed Oct 23, 2024
1 parent b586652 commit 8588f21
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docs/tips.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,20 @@ require("folder-rules"):setup()

Credits to [@tianze0926 for sharing it](https://github.com/sxyazi/yazi/issues/623#issuecomment-2096270843).

## Folder-specific previewer and preloader {#folder-previewer}

In addition to the `mime` rules, Yazi also has `name` rules for pre\{viewer,loader}, which accept a glob expression.
This allows for flexible creation of different pre\{viewer,loader} rules for various directories.

For example, you can use the `noop` builtin preloader for a remote mount point like `/remote`, disabling preloads in that directory:

```toml
# yazi.toml
[[plugin.prepend_preloaders]]
name = "/remote/**"
run = "noop"
```

## Drag and drop via [`dragon`](https://github.com/mwh/dragon) {#drag-and-drop}

Original post: https://github.com/sxyazi/yazi/discussions/327
Expand Down

0 comments on commit 8588f21

Please sign in to comment.