Skip to content

Commit c0b175e

Browse files
committed
some docs
1 parent cdc29e9 commit c0b175e

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

doc/configuration.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,22 @@ To sort files by <a href="https://en.wikipedia.org/wiki/MAC_times#Access_time_(a
124124
(setq projectile-sort-order 'access-time)
125125
```
126126

127+
To sort files by the length of the file path:
128+
129+
```el
130+
(setq projectile-sort-order path-length)
131+
```
132+
133+
To sort files by a user-defined method:
134+
135+
```el
136+
;; passed to PREDICATE of cl-sort
137+
(defun my-custom-sort-method (file1 file2)
138+
(< (length file1) (length file2)))
139+
140+
(setq projectile-sort-custom-method 'my-custom-sort-method)
141+
(setq projectile-sort-order custom-method)
142+
```
127143

128144
## Caching
129145

0 commit comments

Comments
 (0)