Posts: 10
Antixity
Joined: 13 Oct 2012
#1
Hello
I've come across a snag in using lightweight console-based file manager Vifm; if I enter a command that displays an output the output disappears very quickly (I think this is called getting"clobbered"). The problem came to my notice when I used the 'du' comand to get directory size. I entered the command like this:-

:!du -h -a (since I wanted to have the output human readable and get the sizes of the directory's files)

A terminal window flashed up with the output and then disappeared. If I run the above command in the bash terminal console the result displays just fine.

I've edited my ~/.vifm/vimrc file to open various filetypes with the appropriate application but I don't know what do put in this file to get the output to display without getting clobbered.

Any guidance would be appreciated. I've done a websearch but there is not much I can find on Vifm. I've also ran 'man vifm' but the manual is not comprehensive and detailed.

Any help would be appreciated.

Really pleased to be getting the benefit of console apps like vim, vifm, mplayer, ffmpeg and the like.

Cheers! Antixity
Posts: 10
Antixity
Joined: 13 Oct 2012
#2
To correct myself I should have typed ~/.vifm/vifmrc
Posts: 1,308
BitJam
Joined: 31 Aug 2009
#3

Code: Select all

:shell
Then <ctrl>-d or"exit" to get back.
Posts: 10
Antixity
Joined: 13 Oct 2012
#4
I set the"USE_SCREEN" option in the ~/.vifm/vifmrc to"1". Now if I want to run a programme at the Vifm prompt, which gives a screen of ouput, just have to put two exclamation marks in front of it (as opposed to the usual single exclamation mark such as I use when firing up, say, mplayer for a selected file.

Thankfully the vifmrc file is well commented, and documentation at sourceforge for vifm appears pretty exhaustive.

So now I can enter"!!du -h -a" at the vifm on the highlighted directory and the output stays there until I hit the return key. A happy result!
Posts: 10
Antixity
Joined: 13 Oct 2012
#5
BitJam wrote:

Code: Select all

:shell
Then <ctrl>-d or"exit" to get back.
Thanks very much for that BitJam! Adding to my knowledge bit by bit and getting more mouse free as the days roll by __{{emoticon}}__
Posts: 1
xaizek
Joined: 02 Dec 2012
#6
Hi,
Antixity wrote:I've also ran 'man vifm' but the manual is not comprehensive and detailed.
What version of vifm are you using? If your man page differs in some way from the one on vifm.sf.net, it means that your version is probably quite old.

Also the most convenient way of checking single-line output of a command is using %S macro. Just add it to the command after :! and see its output on the status bar.
anticapitalista
Posts: 5,955
Site Admin
Joined: 11 Sep 2007
#7
xaizek - thanks for popping in to help and antiX wishes you all the best with your Vifm project