3

I frequently work on three operating systems (Windows 7, OSX, and Linux) and I keep one .pentadactylrc under version control. Up until recently my settings have been portable enough to work on all three systems (key bindings, marks, hint keys), but it appears that the editor command needs to be different for each OS. I would rather not have to maintain three init files.

Is there a way to set the value of editor conditional on the current OS in .pentadactylrc?

yardsale8
  • 133

1 Answers1

3

Put this in your .pentadactylrc:

js <<EOM
switch (services.runtime.OS) {
   case "Darwin": 
     options.editor = 'open -a macvim -f +<line> +"sil! call cursor(0, <column>)" <file>';
     break;
   case "Linux":
   options.editor = 'gvim -f +<line> +"sil! call cursor(0, <column>)" <file>';
     break;
}
EOM

For now, I cannot tell you the needed string in Windows7, but you may find it yourself

igorepst
  • 181