Welcome to Vifm Q&A, where you can ask questions about Vifm usage. Registration is optional, anonymous posts are moderated. GitHub or Google logins are enabled.

mc-like look

0 votes
asked Jul 16 in vifm by jose

as a long-term mc user i am trying to make a smoother transition by trying to set vifm so it looks very much like this file manager.

so far i've applied the following changes:

  • https://github.com/vifm/vifm-colors/blob/master/mc-like.vifm
    looks quite similar to the theme of the original mc
  • set viewcolumns=-{name},12{size},19{mtime}
    did not find a way how to tell vifm to format dates/times the way ls -l does that
  • set sizefmt=units:si,precision:3
    not exactly the same either
  • windo set timefmt=│%b\ %d\ %Y\ %H:%M│and set fillchars=vborder:│
    attempt to add bars to the output, it would be much better if viewcolumns supports custom characters in the format string

is there anything more i could do?

1 Answer

0 votes
answered Jul 16 by xaizek

did not find a way how to tell vifm to format dates/times the way ls -l does that

You mean when it prints either time or year? Didn't notice it before (and I use long-iso time format there either way). I don't think this can be done via 'timefmt', there is probably no sequence to do it.

set sizefmt=units:si,precision:3
not exactly the same either

For me mc just displays size in bytes.

it would be much better if viewcolumns supports custom characters in the format string

You want to do something like this?

viewcolumns=*{name}..,│,12{size},│,6{}.

is there anything more i could do?

If you're asking about something not mentioned above, then I don't know as I haven't used mc beyond doing a couple of primitive operations.

commented Jul 17 by jose

You mean when it prints either time or year?

it's useful in sense that old files stand out more + it saves you a few characters (that can be taken by longer filenames for instance)

For me mc just displays size in bytes.

i see bytes for files < approx. 400 kB, for bigger files i get K and M.

You want to do something like this?
viewcolumns=*{name}..,│,12{size},│,6{}.

yes, i'd like to be able to do exactly that.

commented Jul 17 by xaizek

it's useful in sense that old files stand out more + it saves you a few characters (that can be taken by longer filenames for instance)

Maybe we can introduce some extra macro which will be expanded in strftime() macros depending on the file.

i see bytes for files < approx. 400 kB, for bigger files i get K and M.

I think it works based on how wide size column is and starts using suffixes when size doesn't fit.

If you would like to make a bug report or feature request consider using GitHub, SourceForge or e-mail. Posting such things here is acceptable, but this is not a perfect place for them.
...