Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I installed vifm through macports.

If I press enter on a file, it just opens it for editing.

How can I launch a file with it's associated program?

i.e. if I have a file highlighted, is there a key I can press so that it does the same thing as

open %c

Where %c is the name of the file that's highlighted?

share|improve this question

I almost accidentally saw this question and decided to provide an answer in case you're still didn't find one in the documentation.

To open files with associated programs you need to add the following command to your ~/.vifm/vifmrc file:

filetype * open %c

Then both l and i keys will work for you as expected. See help on :filetype and :filextype in the documentation.

This doesn't work out of the box, since different systems have different open commands and the default behavior is to open all files with Vim. Maybe new version will contain a set of open commands for different systems in sample vifmrc file, so it will work from the beginning.

share|improve this answer

Using i will open the selected file with its associated program. This is per the online documentation from the Vifm site. I am not sure how or if you can alter which application opens a file from within vi; that might have to be switched elsewhere.

share|improve this answer
Actually open /mp3/file/to/play works just fine. The problem is getting vifm to do this. – z-buffer Feb 25 '12 at 15:27
I misunderstood your question - sorry about that. I edited my answer to hopefully offer the correct information and possibly solution. – soxman Feb 25 '12 at 19:23
i doesn't do anything. I also tried it in Linux and it doesn't work there either. – z-buffer Feb 26 '12 at 1:57

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.