Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JetBrains: Sort a file alphabetically based on first letter of each line

Is there a way to do this in IntelliJ or PyCharm

I have huge constants file and want to be able to easily read through it alphabetically.

like image 579
Ray Avatar asked Nov 21 '25 21:11

Ray


2 Answers

Edit-> Sort Lines as my amigo above stated!

like image 180
Ray Avatar answered Nov 23 '25 14:11

Ray


To quickly sort lines alphabetically, select them in the editor and choose Edit | Sort Lines from the main menu. Alternatively, you can run this action using the Find Action command ⌘⇧A (macOS) / Ctrl+Shift+A (Windows/Linux).

like image 41
ericbsd Avatar answered Nov 23 '25 16:11

ericbsd



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!