Last Updated: February 25, 2016
·
949
· yeraze

Xeno.io and Sublime

Using Xeno.io and Sublime together, I've become more and more annoying by the fact that Sublime opens the entire directory and not the "project". This means all of my default settings (spacings, plugins, etc) don't take effect. Shell scripts to the rescue!

I created a simple bash script called "xeno-editor.sh" in my ~/bin folder like so:

#!/bin/sh
echo Looking in $1
if find $1 -name \*.sublime-project ; then
    subl -p `find $1 -name \*.sublime-project`
else
    subl $1
fi

Mark it permissions 755 ( chmod 755 xeno-editor.sh ), then execute this:

xeno config core.editor ~/bin/xeno-editor.sh

And now when I do a "xen edit" or "xeno resume" it instead opens the first .sublime-project file it finds, or just opens the directory as a whole if none are found.

Success!!