SublimeText2 as Editor (1) Compile

I have been making a move to sublimetext2 in linux as my primary development environment. This series of posts will look at the editor and various tweaks and addons that are needed to get working with C# code. There are tons of tutorials about sublime online but none seem to cover setting up a C# environment. To start with let’s learn how to be able to compile code.

Go to tools->build->new build. A file will open. Drop in:

“cmd”: [“xbuild”],
“path”: “/opt/mono/bin/”,
“working_dir”: “${project_path:${folder}}”,
“file_regex”: “^ (.*)\\(([0-9]*),([0-9]*)”

Then save this file named xbuild.

Note I run mono trunk built from source which is why my prefix is /opt/mono. Now when you have a folder open for your project it will run xbuild in the root of that folder. This only works if there is only a single solution in the root folder. To build use ctrl+b or f7.

In the next post we will look at switching between code and basic navigation.

One Comment

  1. Parajao
    Posted September 29, 2012 at 11:33 am | Permalink | Reply

    I think I’ll need to detoxify myself from using Resharper before starting to use Linux with c#
    Is mono ready for Enterprise development?

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: