Open lavermil opened 3 years ago
Here is a sample config to play with too. sample_config.txt
+1 this would also be super useful for sorting markdown task lists where it could sort checked - [x]
below unchecked - [ ]
items while keeping tasks at the same indentation levels by ignoring whitespace preceding the task list syntax, e.g. regex = ^[:blank:]*.+
.
Can you add the support to do single and multilevel block sorts. So you will sort based on the parent (non-indented lines) but also have an option to sort the children and any other sub-levels too.
This is very helpful in the world of comparing network device, application configs, etc using diff tools. Sometime as different version come out and they change config files/etc around the order of stuff/etc. Without this python script I have below it is very hard to compare them.
My method in python I am using allows me to specify what the indent pattern is. For example if you want to use a tab, 2 space, 3 space, 4 spaces, etc. I have also added in python the ability to filter out lines like ! or # or what ever I want as long as it is an exact match.
Example:
Desired: