Ignore leading spaces when sorting
See original GitHub issueI try to sort this code with selection as shown below
> $bundles[] = new DebugBundle();
$bundles[] = new SensioDistributionBundle();
$bundles[] = new WebProfilerBundle();<
(selection shown as >selected text<)
Expected:
$bundles[] = new WebProfilerBundle();
$bundles[] = new SensioDistributionBundle();
$bundles[] = new DebugBundle();
- Leading whitespace is ignored
Actual:
$bundles[] = new DebugBundle(); <------ PROBLEM
$bundles[] = new WebProfilerBundle();
$bundles[] = new SensioDistributionBundle();
- Leading whitespace is taken into account.
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Why does the UNIX sort utility ignore leading spaces without ...
It depends on the locale. With LC_COLLATE=en_US.utf8 sort myfile. I get your unexpected result, and with. LC_COLLATE=C sort myfile.
Read more >Sort with unequal whitespace in first column
Sort with unequal whitespace in first column · How is the file generated? You should use a different separator. · the file was...
Read more >How to Remove Leading and Trailing Spaces in Excel
In Excel, you can easily remove Leading spaces (at start of text) and Trailing spaces (at end of text). Click here for Excel...
Read more >GNU sort -t ":" -n numeric -b blanks ignored -f fold lowercase to ...
The --ignore-leading-blanks (-b) , --dictionary-order (-d) , --ignore-case (-f) and ignore unprintable ( -i ) options are dependent on LC_CTYPE locale.
Read more >[Chapter 36] 36.4 Confusion with White Space Field Delimiters
And be careful of leading spaces; a word with an extra space before it will be sorted before other words. Therefore, use an...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I forgot to thank you 😃 I’m using it regularly and it works great.
Done and released.