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.

Screen real estate: Minimizing the waste

0 votes
asked Sep 24, 2015 in vifm by anonymous

I have a small screen and I use dwm to manage my windows; hence this list of suggestions for minimizing real screen estate:

  • Disable the seemingly arbitrary limit to the terminal size (30x10?), which prevents vifm from executing, and displays "Terminal is too small for vifm" whenever there are many tiny windows squeezed on the screen.
  • Reduce the width of the border in the center and around vifm.
  • Remove ../ from every folder —What is the point of it if h, , and gh all go up a directory? It wastes space and doesn't look good.
  • Remove the name of the selected file from the status line. It is pointless, because the name of the selected file is already obvious: it is selected!
  • Reduce the length of configuration files: Comments are so long that the files get confusing, and the looong headers are a waste of space and time scrolling.

Let me know what you think :)

1 Answer

+1 vote
answered Sep 25, 2015 by xaizek

>Disable the seemingly arbitrary limit to the terminal size (30x10?), which prevents vifm from executing, and displays "Terminal is too small for vifm" whenever there are many tiny windows squeezed on the screen.

It can be reduced I guess, but removing the limit completely is bad idea, because curses can crash for some window configurations then.
Even on 30x10 dialogs are unusable, so for some cases it's already less then minimal. Something like 15x5 might work (I didn't just divide it by two :) ).

>Reduce the width of the border in the center and around vifm.

This can be achieved by changing 'tuioptions':

set tuioptions-=sp

>Remove ../ from every folder —What is the point of it if h, ←, and gh all go up a directory? It wastes space and doesn't look good.

Use 'dotdirs':

set dotdirs=

>Remove the name of the selected file from the status line. It is pointless, because the name of the selected file is already obvious: it is selected!

Remove %t from the value of 'statusline' option. This is actually useful for very long file names which you don't see in full in the list.

>Reduce the length of configuration files: Comments are so long that the files get confusing, and the looong headers are a waste of space and time scrolling.

Well, they are meant to be helpful sample files, something short won't explain much. Although maybe some comments can be removed, this needs to be checked.

Let me know what you think :)

Options gained their default values by historical reasons, so I'm not inclined to change them, but given reduced limit on terminal dimensions, this can be added as a separate section to sample vifmrc (and increase their length a bit :) ).

commented Sep 25, 2015 by anonymous

Awesome. I can send you a sample vifmrc that is both short and helpful.

Actually, inline comments would help a lot, though I suppose they would add an unnecessary layer of complexity from a programming standpoint. Right?

commented Sep 25, 2015 by xaizek

I didn't try adding inline comments, but they are indeed somewhat inconvenient (partly due to looking like unfinished quoted string), especially in case of multiple lines. You can do

some long
    " comment
    \ command

now, adding

set option " comment

shouldn't be hard, but

some long " extensively commented
    \ multiline " command

is a complicated case to handle.

commented Sep 25, 2015 by anonymous

Multiline inline comments are overkill.

Simple inline comments would be good enough.

commented Sep 25, 2015 by xaizek

Turns out Vim doesn't support such multiline comments as well, it highlights them as if they were supported, but parser desn't remove them when joining the lines.

If you would like to make a bug report or feature request consider using GitHub, SourceForge or e-mail. Posting such things here won't be considered as spam, but this is not a perfect place for it.
...