Alright, custom viewer / editor have made their way to the nightly build. Haven't had the time to write a proper UI for it yet, so bear with me, it's a bit hackish.
First, start the latest nightly build, then quit it. Yes, I know, that sounds a bit strange, but that's to make sure muCommander writes the latest version of the configuration files.
You then need to locate and edit your preferences.xml file following the instructions found here:
http://www.mucommander.com/forums/viewtopic.php?t=443
If everything went well, you should be able to find the following elements:
- Code: Select all
<viewer>
<use_custom>false</use_custom>
</viewer>
<editor>
<use_custom>false</use_custom>
</editor>
Modify this so it looks like:
- Code: Select all
<viewer>
<use_custom>true</use_custom>
<custom_command>open -a Preview $f</custom_command>
</viewer>
<editor>
<use_custom>true</use_custom>
<custom_command>open -a Emacs $f</custom_command>
</editor>
You can of course put whatever command you want in the
custom_command elements.
Editing commands should be fairly straightforward. You can use the following special tokens:
- $f: will be replaced by the selected file's full path.
- $p: will be replaced by the selected file's parent.
- $n: will be replaced by the selected file's name.
- $j: will be replaced by the JVM's current directory.
If you want to keep using the internal viewer / editor, just set
use_custom to
false.
Note that while muCommander let's you view / edit file that are located on remote servers, most softwares do not know how to deal with protocols such as sftp or ftp . For this reason, the file will be copied locally in your temp directory and deleted when you exit muCommander.
What this means is:
- if it's a big file, the viewer / editor will take a while before starting.
- editing remote files really doesn't make much sense, as the modifications will only be applied locally.
If you still want to have the ability to edit remote files, well, I'm afraid you're stuck with the internal editor. Luckily, you can bind your custom editor to one shortcut and the internal one to another: edit the
action_keymap.xml file located in your preferences folder and add the following lines:
- Code: Select all
<action class="com.mucommander.ui.action.InternalEditAction" keystroke="shift F4"/>
<action class="com.mucommander.ui.action.InternalViewAction" keystroke="shift F3"/>
The internal editor is now bound to
shift F4 and the internal viewer to
shift F3.
Hope this helped. If any of it is a bit obscure, let me know and I'll try to clarify things.
Nicolas