open.vim-Open files and web pages in associated programs from Vim

This Vim plug-in has been abandoned! Most of its code has been absorbed into my miscellaneous scripts for Vim while the user interface part is still found in my vim-shell plug-in. I will no longer maintain the open.vim plug-in since I’m shifting focus to the miscellaneous scripts (because they’re included in all of my Vim plug-ins and since I need the “open associated programs” functionality in several of my plug-ins, this makes most sense).

The open.vim plug-in knows how to open files, directories, URLs and e-mail addresses from inside Vim using the associated programs. It should work on Windows, Mac OS X and most Linux installations.

This plug-in doesn’t define any mappings or commands so that other Vim plug-ins that need to launch a web browser can easily bundle the open.vim script. If you are looking for mappings / commands you can try my shell.vim plugin.

Note that on Windows a command prompt window pops up temporarily when either of the functions is called. If this bothers you then you can install my shell.vim plug-in which includes a DLL that works around this issue. Once you’ve installed both plug-ins it should work out of the box!

This function takes a string argument containing a file or directory path and opens it just like double clicking the file or directory in your desktop environment would do. This means directories are opened in your file manager, image files are opened in an image viewer, ZIP files are opened in an archiving application, etc.