obsidian-sort-and-permute-lines icon indicating copy to clipboard operation
obsidian-sort-and-permute-lines copied to clipboard

FR: reverse order

Open calmwaves111 opened this issue 1 year ago • 2 comments

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


calmwaves111 avatar Nov 02 '23 13:11 calmwaves111

I am looking for this functionality, too! Is this possible to add? Thank you for this great plugin!

lup3v0 avatar Apr 09 '24 20:04 lup3v0

I am looking for this functionality, too! Is this possible to add? Thank you for this great plugin!

hello, I'm not a professional programmer, but I tried to change the code in the file main.js to change the 【sort headings】to be in reverse order

just in line 267 exchange the positions of a and b return _this.compare(b.title.formatted.trim(), a.title.formatted.trim());

calmwaves111 avatar Apr 10 '24 14:04 calmwaves111