View previous topic :: View next topic |
Author |
Message |
vcmota Guru
Joined: 19 Jun 2017 Posts: 367
|
Posted: Wed Apr 14, 2021 3:00 am Post subject: [SOLVED] How to order files in VIFM |
|
|
I have started to use VIFM as my file manager a few days ago, and, although I have already mastered most of what I need, there are some things that does not seems to be simple, and that I could not guess from the manual. I am referring to how to order the files in a folder. Is there a command to do that, or, better, a shortcut/keystroke? What I would like is a behavior like that: I type some keystroke and the files became ordered by date of creation, starting from the newest; now I hit another keystroke and the files are now reordered again by date of creation but now starting from the oldest; now I hit a keystroke and the files are ordered alphabetically, and so on. In other words, I would like to emulate though the keystrokes the behavior of non-console file manager where you click in a certain point to redefine those listings.
Is there a way?
Thank you all for your attention.
Last edited by vcmota on Sun Apr 18, 2021 5:23 pm; edited 1 time in total |
|
Back to top |
|
|
vcmota Guru
Joined: 19 Jun 2017 Posts: 367
|
Posted: Sun Apr 18, 2021 4:41 pm Post subject: |
|
|
I found a partial solution. It is actually no hack at all, it is simple:
Code: |
nnoremap l :sort<cr>m
|
I call it a partial solution because apparently I cant invert the order of the presentation of the files, they seems to always be shown from older to newer, although I find the opposite more useful. I will keep looking... |
|
Back to top |
|
|
vcmota Guru
Joined: 19 Jun 2017 Posts: 367
|
Posted: Sun Apr 18, 2021 5:22 pm Post subject: |
|
|
I think I found it. Again, no hack, just a simple solution. The command below makes "lm" toggle the sorting order of everything show in a vifm tab regarding time of creation:
Code: |
nnoremap lm :sort<cr>m:invert o<cr>
|
The command below make "ls" do the same but with file size:
Code: |
nnoremap ls :sort<cr>s:invert o<cr>
|
Awesome! |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|