# Anchored Sort Keep Obsidian's own file explorer sorting (for example **Modified time, new to old**) running automatically, and anchor only the items you choose to a fixed spot. - New and recently edited notes keep jumping to the top, just like normal. - An item you drag to a spot **stays there**, even after you edit it. - Nothing is renamed, numbered or moved into folders. Your files are left alone. ## How it works Each anchored item remembers its position **counted from the top or from the bottom** of its folder: | You drop an item… | It is stored as | What happens when new notes appear | | --- | --- | --- | | in the upper half of the list | position **N** from top | it stays at position **N** from the top | | in the lower half of the list | position **N** from bottom | it stays at position **N** from the bottom | Everything that is not anchored fills the remaining spots in Obsidian's current sort order, so the live sort is never frozen. ### Example (sorted by modified time, new to old) 1. Notes: `A` (newest), `B`, `C`, `S`. Drag `S` to the bottom: it is anchored _1st from bottom_. 2. Edit `C`: the list becomes `C A B S`. `S` stays at the bottom. 3. Edit `S`: still `C A B S`. 4. Create note `N`: `N C A B S`. 5. Release `S`: it goes back to its normal place, which is the top because it was edited last. ## Usage - **Drag and drop**: in the file explorer, drag a file or folder onto another item in the same folder. A line shows where it will land. Dropping onto the middle of a folder still moves the item into that folder, as usual. - **Right-click menu**: _Anchor to top_, _Anchor to bottom_ and _Release anchor_. Works with multiple selected items too. - **Commands**: anchor the current file to top or bottom, release the current file, release all anchors. - **Settings**: turn drag and drop or the pin indicator on or off, and see or release every anchored item. Anchors work in every folder, including the vault root. Renames, moves and deletions are tracked automatically. On mobile, use the right-click (long press) menu. ## Compatibility Obsidian has no public API for the file explorer order, so this plugin wraps the explorer's internal `getSortedFolderItems` method (with [monkey-around](https://github.com/pjeby/monkey-around), so it can coexist with other plugins). If a future Obsidian version changes this internal method, the plugin falls back to Obsidian's normal order instead of breaking the explorer. Do not use it together with other plugins that reorder the file explorer, such as _Custom File Explorer sorting_ or _Explorer Order Editor_. ## Installation ### From Community plugins Settings → Community plugins → Browse → search for **Anchored Sort**. ### Manually 1. Download `main.js`, `manifest.json` and `styles.css` from the latest [release](../../releases). 2. Copy them into `/.obsidian/plugins/anchored-sort/`. 3. Reload Obsidian and enable **Anchored Sort** in Settings → Community plugins. ## Development ```bash npm install npm run dev # watch build npm run build # production build npm run lint ``` To release: bump the version with `npm version patch|minor|major`, push the tag, and publish the draft release created by the GitHub workflow. --- ## Türkçe Obsidian'ın kendi sıralaması (ör. **Modified time, new to old**) otomatik çalışmaya devam eder; yalnızca senin sürüklediğin öğeler bıraktığın yerde sabit kalır. - Yeni açılan ve düzenlenen notlar her zamanki gibi en üste çıkar. - Bir notu bir yere sürüklediysen, sonradan düzenlesen bile **orada kalır**. - Dosya adı değiştirme, numara ekleme ya da klasör açma gerekmez. Listenin üst yarısına bıraktığın öğe "üstten N. sıra", alt yarısına bıraktığın öğe "alttan N. sıra" olarak sabitlenir. Sağ tık menüsünde **En üste sabitle**, **En alta sabitle** ve **Sabitlemeyi kaldır** seçenekleri vardır. Arayüz Obsidian dili Türkçe ise Türkçe görünür. ## License [MIT](LICENSE)