Giter Club home page Giter Club logo

obsidian-sort-and-permute-lines's Introduction

Vinzent

Hey, I'm a student from Germany building apps with Flutter and plugins for Obsidian.

If you want to support me you can consider:


ko-fi

obsidian-sort-and-permute-lines's People

Contributors

0x4c46 avatar stevedoyle avatar vinzent03 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

obsidian-sort-and-permute-lines's Issues

dealing with indentations

Great plugin, thanks for writing.

I'm a bit of a list fan, and end up writing bulleted lists quite often. If they have indentations, the indented lines get sorted with the list, instead of separately. e.g.

- item b
- item d
    - item a 
    - item e
- item c

Get sorted as

    - item a
- item b
- item c
- item d
    - item e

instead of:

- item b
- item c
    - item e
- item d
    - item a

I think for most folks, an indentation is attached to the parent item, and would mean to skip the sorting of the parent, but possibly sort within that particular level.

To sort based on the outline

Right now when I sort a note it just sort them not considering heading s and outline of the note. Can you please make it to sort inside the structure of the outline. I don't know why someone wants to sort stuff outside the outline

[Feature Request] Multiple-level sort

I would love to see this be able to sort headings and their contents.

So that a list like:

  • Boots
    • Work
    • Cowboy
  • Apples
    • Red Delicious
    • Honeycrisp

Would be transformed into a list like this:

  • Apples
    • Honeycrisp
    • Red Delicious
  • Boots
    • Cowboy
    • Work

[feature request] Preserve parents when sorting

It would be nice if, in a list, children bullet points were not separated from their parent bullet point.

For example, currently the list:

- qux
- cccc
	- aaaa
	- zzze
	- baba
- bbb
	- vvv
- foo

sorts alphabetically into:

	- aaaa
	- baba
- bbb
- cccc
- foo
- qux
	- vvv
	- zzze

But if child-parent bullet point relationships are preserved, the list would be instead sorted to

- bbb
	- vvv
- cccc
	- aaaa
	- baba
	- zzze
- foo
- qux

This may be more difficult to implement, but I would greatly appreciate such a feature since most of the time when I'm using the plugin to sort my to-do list the architecture of my list becomes broken. Thanks!

Checkbox lists are not handled correctly

  1. I have a list with checkboxes using the Markdown syntax: - [ ] and - [x]
  2. Some are checked (- [x])
  3. When I sort the list, checkboxes are not taken into account, only the text acfter them, which is not logical IMO: the very purpose of me sorting the list was to isolate checked lines from unchecked ones (apart from the alphabetical sub-sort).

What I described is the way sorting works in VS Code.

Sorting bug

There seems to be a bug when sorting. Haven't tracked down the exact issue, but when I have a list item link above the lines to sort, the sort result is wrong. See gif, notice the 0 is between the f and g :
obsidian sorting doesnt work

Obsidian version 0.12.3
Sort and Permute lines version 0.1.1

FR: Sort by dates

Similar to issue #26 - when using this plugin to sort a list of checkboxes built by the tasks plugin, it would be useful to have the option to sort by the first YYYY-MM-DD format date in the line string.

[request] alphabetic sorting considers alias

Hi, just downloaded this to use in my notes index, but noticed that the plugin grabs the original name of the linked note instead of the alias being used.

Would it be possible to make it ignore the original name and sort based on the alias?

Thanks!

[Bug] in Sort Alhgorithm

maybe unknown Bug in Sort Algorithm

I recently downloaded your Obsidian plugin in the need to sort some long lists with checkboxes (you got me those where shopping lists :D)

so i selected the whole list and pressed ctrl+p to sort the List alpabetically + checkboxes.

first it messed up my whole document, soine i did not know that i had to elect the specific list first lul

after that i ctrl-z tted everything and selected the list i wanted to have sorted.

it sorted the list perfectly expect the items which contained a "Z" or "z" on its first letter, those where placed everytime i wanted to sort the list - wrether or not having been checked on the end of the list, while every other item was sorted perfecly

but: good news!!

this is the only bug i found so far ;)

Thank you anyways for creating such a useful plugin!!!

Best regrets

[FR]: Sort contents in ordered list

My wish

I noticed that sort current list alphabetically command is useful for bullet list but not ordered list. In my case I wanna sort the content without list number in front of it. But the command would sort the list by list number. Actually outliner plugin would modify the list number automatically.

My suggestion

If it's not easy to sort contents without list number, I think you can remove list number first and add them after sorting the content. Thank you for your effort. 😄

Automatically sort lists when a new list item is created, or when one is changed.

Let's say I have this list

  • A
  • F
  • B
    and I add "C" to the top of the list. I would like it to be moved to below B, and for F to move below C, sorting the entire list automatically.

And when I check off an item on the list, it automatically goes to the bottom, and any checked boxes that aren't on the bottom go there. There could be settings in the plugin to automatically sort alphabetically and or by checkbox status, recursively or non recursively.

There could also be a setting to check for frontmatter, and have the plugin be opt in or opt out on certain pages. Like, if there was a setting on to automatically sort, there could be a frontmatter like this:

---
disable-sorting: true
---

and vice versa.

Sorting doesn't work with Wikilinks

Thanks for your very useful plugin.
I noticed today that sorting of lists of wikilinks
[[Name A]]
[[Source B]]
[[Note C]]

Doesn't work. Would come in handy for TOC's and MOC's.

Thanks, Jan

Alphabetical sorting of lists with tasks complete and incomplete processes incorrectly

I have a list of tasks with items complete and incomplete [x] and [ ]. This scenario resolves to complete tasks being sent to the bottom of the page instead of being properly organized alphabetically. Here is an example of list after being sorted alphabetically:

- [ ] Smith, Linda Tuhiwai...
- [ ] Tzul, Gladys Tzul...
- [x] Emiliani, Maria E. Posse...
- [x] Hawkes, Gina Louise, David Pollock, Barry Judd, Peter Phipps, and Elinor Assoulin...
- [ ] Younging, Gregory...

Empty lines are not processed correctly

This happens if strict markdown style is applied to create new lines. E.g.:

Sort the lines below in alphabetic order

c

b

a

and we get

 
 
a
b
c

Maybe an option could be provided to determine the behavior of the extension.

Feature request: Allow users to create custom sorting commands in a settings menu.

I noticed that the plugin has a bunch of different commands for sorting alphabetically, recursively, and by length. However this doesn't cover all the different things a user would want to do. It would be ridiculous to hardcode commands for every single possible combination, so instead the plugin should have a settings menu where users can create their own sorting commands and select which options they want:

Button: Create a new command

Command

(the user can set the command name by selecting it and it would show a text editing box or field)
Button: delete command

  • Sort by checkboxes
  • Sort alphabetically
  • Sort by name length
  • Sort recursively

Those would be on off switches. Sorting alphabetically and name length may be conflicting, so you could add a note about that above the list of commands, and gray out one out if the other is selected. Users should be able to rename commands without losing the keybinds for them, I know there's one plugin that does that.

Sort list bug, final line is not truncated properly

Found a strange bug, with the sort list function. Obsidian 0.13.6 / plugin ver 0.3.0

It depends on where the cursor is when you trigger the sort, so I am guessing it's related to the function below, but I can't quite wrap my head around where the bug is.

getPosition(view: MarkdownView, fromCurrentList: boolean = false): { start: number; end: number; endLineLength: number; } | undefined {

Example, try sorting this list with the cursor at the | position:

- [ ] beta
- [x] acme
- [x] warren
- [ ] zelda
- [x] simon & garfunkel|
- [ ] davidoff

(hint: It works fine)

BUT, if you position the cursor here:

- [ ] beta|
- [x] acme
- [x] warren
- [ ] zelda
- [x] simon & garfunkel
- [ ] davidoff

and sort...

- [x] acme
- [ ] beta
- [ ] davidoff
- [x] simon & garfunkel
- [x] warren
- [ ] zeldadoff

(note the extra doff chars at the final line)

FR: reverse order

I use 【sort heaings】,the headings are timestamp,I need the newest one at the front;

The original text looks like this

## 20231102-211458

some text11111111111111111

## 20231102-211822

some text2222222222222222

## 2023-11-02-214208

some text3333333333333333

I hope that after running the command【sort heaings】, it will become like this


## 2023-11-02-214208

some text3333333333333333

## 20231102-211822

some text2222222222222222

## 20231102-211458

some text11111111111111111


FR: Sort by tags

I use this plugin to sort tasklists. I often enter tasks in this kind of form:

- [ ] Work out how to use #Obsidian sorting plug-in
- [ ] Document my #Obsidian task management process

It would be useful to sort by the tag in the task text so that all my #Obsidian tasks end up together. This would make tasks simpler to input and read much more naturally (the alternative is to put tags at the front, which requires a bit more thought about phrasing and slows down task input).
Additionally, if you could also support this with a "by checkbox" option then that would be great.
Thanks for a useful plugin!

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.