Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setlocal conflicts with other sorting #1858

Open
simonhughxyz opened this issue Nov 20, 2024 · 1 comment
Open

setlocal conflicts with other sorting #1858

simonhughxyz opened this issue Nov 20, 2024 · 1 comment

Comments

@simonhughxyz
Copy link

When using setlocal for sorting and then change sorting manually afterwards in the same folder it does not sort the folder properly.

Tried with: setlocal ~/Downloads/ sortby time; set info time
Followed by :set sortby size
and set info size to be able to see the sizes.

The expected behavior is for the files to be sorted by file size, but they appear to be shuffled randomly.

@joelim-work
Copy link
Collaborator

This is expected behavior:

  • set applies to all directories
  • setlocal applies to only the specified directory, and takes precedence over set.

Generally setlocal is used for directories for which a particular setting should be 'fixed'. I don't think it's worth adding a third layer of setting which can temporarily override setlocal, but for your case maybe you can try setlocal ~/Downloads/ sortby size.

Also just a note that you can use set info size:time if you want to see both at the same time, if it makes it easier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants