Sublime Text

Discussion in 'Unity Gossip' started by jedy, May 15, 2012.

  1. jedy

    jedy

    Member

    Joined:
    Aug 1, 2010
    Messages:
    568
    I've recently stumbled on Sublime Text and I'm purely amazed!

    This thing is faster than Mono Develop and way more comfortable. It has some couple of awesome features, but that's not the main point.

    I've seen a couple of Unity developers interested in this ( mainly Jacob Pennock ) and a couple of plugins already created and ready to use. It's pretty close to being a full featured IDE, but it still needs some work to be able to fully support the whole process. ( It can't build, projects for instance )

    I'm currently working on a build system working with Visual Studios "devenv", which works but it's far away from convenient.

    Anyway - Is anyone else interested in the whole Sublime Text Unity development?
  2. karl_

    karl_

    Member

    Joined:
    Mar 4, 2010
    Messages:
    246
    Heck yeah! I've been using it as my primary IDE for about a month now.
  3. jedy

    jedy

    Member

    Joined:
    Aug 1, 2010
    Messages:
    568
    I'm getting the hang of python and in my spare time I'll try getting it a bit suited for bigger projects.

    I gotta finish some sort of useful build system ( for now it's just some static vars ) and "Go To Definition" functionality.

    Any ideas what else could improve the workflow ?
  4. Izitmee

    Izitmee

    Member

    Joined:
    Jan 27, 2011
    Messages:
    1,905
    But... it's not free and there is no files panel, no class inspector panel, no refactoring, no... :p Though it actually looks nice, thanks for sharing :) But from a developer's point of view, could you list the pros/cons VS MonoDevelop (apart the fastness - which is understandable, since there appear to be so fewer features), if you have the time.
  5. yuriythebest

    yuriythebest

    Member

    Joined:
    Nov 21, 2009
    Messages:
    925
    Hi! I've tried it, however it only seems to open a single file at a time, no "solution/project" as a whole- so it doesn't do refactoring/renaming/etc but overall looks nice!
  6. jedy

    jedy

    Member

    Joined:
    Aug 1, 2010
    Messages:
    568
    Well actually :
    It's not free, yes - it's on an unlimited trial. ( It pops up a message every 50 or so saves though )
    There is a files panel which isn't the best, but with an additional plugin - it's just as useful as the MonoDevelops file panel.
    Their alternative to class panel is amazing and has a lot of cool options besides jumping to different methods ( jumping to lines, files and basically everything )
    The string search/replace tool works with regular expressions and is pretty powerful by itself - it still lacks some refactoring features though.

    There are actually 2 giant pros over most of the IDEs I've seen - extensibility and ease of use.
    It has a strong plugin system, that with a Must Have package called Package Control makes installing plugins a breeze - it handles syncing with the repository downloading and initial configuration of all packages, while you only have to pick an item from a dropdown. Adding new functionality is pretty simple too, and pretty much could fill in for most of the minor gaps ( custom hotkeys ).
    The already created plugins library is pretty broad too, so most of the tedious things are already created for you.

    The other thing is that everything basically is available through 2 menus, accessible from hotkeys. You could basically download packages, use packages, change the syntax highlighting, theme, jump to files, functions etc without you hands actually leaving the keyboard and with no tedious submenu navigation.

    Oh yeah - it's portable. Not really something important for my laptop, but some people will love this.

    There are cons though - at it's current state it will require some work to actually replace MonoDevelop.

    It can't rename both a class and it's file - you have to manually do that.

    There is no debug system connected with Unity ( and at complex projects - this may be vital )

    There is no build system.

    There is no "Jump To Definition"

    I'm working on the last two because I can't have a main IDE without those two. The renaming is something I can live with - I don't do this all the time and for debug sessions I will still use MonoDevelop.

    PS : It doesn't work with .NET projects, they have their own project files which I'm trying to customize for C# and Unity.
  7. Izitmee

    Izitmee

    Member

    Joined:
    Jan 27, 2011
    Messages:
    1,905
    Wow, ok, you sold me. I won't try it with Unity, but will definitely download it and check it out for other uses as soon as I have the time. Thanks a lot for taking the time to make such a detailed description :)
  8. jedy

    jedy

    Member

    Joined:
    Aug 1, 2010
    Messages:
    568
    Okay, finally got "Go To Definition" and Build up and running!
    The "Go To Definition" configuration is retarded, but I'm working on that.
  9. taumel

    taumel

    New Member

    Joined:
    Jun 9, 2005
    Messages:
    5,283
    Kickass editor, one of the best pieces of software i've encountered not only for this year.
  10. DallonF

    DallonF

    Member

    Joined:
    Nov 12, 2009
    Messages:
    521
    Nope, it can definitely open a files sidebar. Go to File > Open Folder, Project > Add Folder to Project, or View > Side Bar > Show Open Files. I've been using it pretty extensively for web development and I like it, but I'm not sure it's best for a compiled language.
  11. Izitmee

    Izitmee

    Member

    Joined:
    Jan 27, 2011
    Messages:
    1,905
    Got it! Currently using it only for quick CSS editing, but already loving it :)
  12. dogzerx2

    dogzerx2

    Member

    Joined:
    Dec 27, 2009
    Messages:
    2,495
    I like the minimap!
  13. jedy

    jedy

    Member

    Joined:
    Aug 1, 2010
    Messages:
    568
    Didn't have time to do much on the subject, but I wanna try to hack into Visual Studio or Mono to do my autocompletion - the only thing that actually stops me from using this as my main IDE atm.
  14. Izitmee

    Izitmee

    Member

    Joined:
    Jan 27, 2011
    Messages:
    1,905
    Hey, I'm having issues with shortcuts. The "SHIFT+/" comment toggle doesn't work when pressing "/" on the numeric keypad. Did you find how to bind a keypad key?
  15. jedy

    jedy

    Member

    Joined:
    Aug 1, 2010
    Messages:
    568
    Dunno about that, it should be possible though - check the forums on their website maybe ?
  16. rstehwien

    rstehwien

    Member

    Joined:
    Dec 30, 2007
    Messages:
    101
    I recently found and fell in love with sublime... its command pallet and file switching remind me of emacs. There is a code completion tool for c# that I'm trying to get to work for me (probably just need to give the right paths to assemblies):
    https://github.com/quarnster/CompleteSharp

    Make sure you get Package Control (http://wbond.net/sublime_packages/package_control) then install all of Jacob's Unity tools. Check out these posts:
    http://www.jacobpennock.com/Blog/?p=647
    http://www.jacobpennock.com/Blog/?p=568

    If I could just get code completion done, I'd be able to use Sublime. Would miss refactoring... but I'm pretty sure that renaming refactors could just be done with one of the smart replacements in Sublime.
  17. jedy

    jedy

    Member

    Joined:
    Aug 1, 2010
    Messages:
    568
    Yeah Jacob almost got it going with Sublime. I'm not too happy with the results but work is knocking at the door and I'm out of spare time to invest into making it suitable for my needs :(

    Still I'm using it for web stuff and it's pretty awesome. I wonder how fat would it go after the beta finishes :D
  18. Izitmee

    Izitmee

    Member

    Joined:
    Jan 27, 2011
    Messages:
    1,905
    I'm liking Sublime Text more and more, and now I'll definitely try to use it with C# and Unity too. Only con, as of now: it's a pain in the ass with non US keyboards (or at least with Italian ones). The quotation marks key can't be used for bindings, nor the numeric keypad "/" - and probably more, but these are the ones I found :p
    Last edited: May 28, 2012
  19. jedy

    jedy

    Member

    Joined:
    Aug 1, 2010
    Messages:
    568
    Code (csharp):
    1. "/".encode('string-escape')
    This could work.
  20. Izitmee

    Izitmee

    Member

    Joined:
    Jan 27, 2011
    Messages:
    1,905
    Ouch, sorry jedybg, I meant that "/" doesn't work from the numeric keypad (I checked the forums, and it seems there's no straight solution). Anyway, that's definitely not a big problem - and again, thanks for letting me know this awesome editor :)
  21. jedy

    jedy

    Member

    Joined:
    Aug 1, 2010
    Messages:
    568
    Ah, yeah - this kind of sucks.
    And you're welcome :D
  22. AngryOrange

    AngryOrange

    Member

    Joined:
    Jan 30, 2012
    Messages:
    103
    Hi
    It's really great solution , but there is no syntax checking.
    Last edited: Dec 10, 2012
  23. Izitmee

    Izitmee

    Member

    Joined:
    Jan 27, 2011
    Messages:
    1,905
    SublimeText is definitely not for beginners (at least when combined with Unity) :p You should go with MonoDevelop (or VisualStudio) and then come back later.
  24. AngryOrange

    AngryOrange

    Member

    Joined:
    Jan 30, 2012
    Messages:
    103
    yep you are right. I go back to MD very quickly:). I was looking for another script editor because:
    1.I get used to use TextMate
    2. Sometimes MD working very slow ( I'am on Mac) which is very strange for me because my scripts are about only 100-150 lines.
    3. I can not work with two open windows, not tabs, windows. Jumping between tabs make me mad.

    To be honest the only thing that is missing for me in Sublimetext solution is checking syntax and highlights errors that's all.
  25. Izitmee

    Izitmee

    Member

    Joined:
    Jan 27, 2011
    Messages:
    1,905
    Ehe, I agree, MD is a pain in the ass :p Though error highlighting will probably never be added to SublimeText, because it would probably spoil its wonderful speed.
  26. jedy

    jedy

    Member

    Joined:
    Aug 1, 2010
    Messages:
    568
    Can't be sure about that, taking in account that that's just the beta functionality :D

    Anyway, there are quite the few ways to compile with it, when they get a decent C# compiler running syntax checking shouldn't be a problem ( and with decent compilation in another thread, the speed wouldn't be an issue ).
  27. Izitmee

    Izitmee

    Member

    Joined:
    Jan 27, 2011
    Messages:
    1,905
    Mhmm sounds yummy. Hope this happens soon :)
  28. AngryOrange

    AngryOrange

    Member

    Joined:
    Jan 30, 2012
    Messages:
    103
    Last edited: Dec 10, 2012
  29. bngames

    bngames

    Member

    Joined:
    Jul 3, 2012
    Messages:
    52
  30. mindlube

    mindlube

    Member

    Joined:
    Oct 3, 2008
    Messages:
    993
    I'm kind of amazed at how popular Sublime Text is, considering the price. It has caught my attention though, since it seems like every single screencast I ever watched lately pictures sublime text being used :rolleyes:

    However, if you want to see what Sublime Text can become after about 15 more years of engineering work, take a look at Slickedit
    http://www.slickedit.com

    It's a very similar type of app, with a focus on being fast and correct, with lots of support for plugins and macros, etc.
  31. Izitmee

    Izitmee

    Member

    Joined:
    Jan 27, 2011
    Messages:
    1,905
    From what I saw, SlickEdit looks like a regular coding environment, like MonoDevelop, though better and possibly slicker. Sublime Text is a very different beast, more loose and flexible?
  32. mindlube

    mindlube

    Member

    Joined:
    Oct 3, 2008
    Messages:
    993
    I think of Slickedit as a very expensive and evolved version of something like Sublime: it's language agnostic, and uses plugins and a tagging engine to make syntax and context-aware things happen. At it's core it's only a text editor. Perhaps the big price tag of Slickedit makes one think it's more like an IDE than it really it is :)

    Anyways I hope to download Sublime soon, and check out all these Unity plugins that people have written. A community of open source plugin writers is really awesome.
    Last edited: Feb 15, 2013
  33. krur

    krur

    Member

    Joined:
    Jun 10, 2011
    Messages:
    95
    on OSX Unity we have just MonoDevelop if we want the "full IDE stuff" and Sublime Text for the fast coding..

    i use Sublime daily for everything (and betatesting soon to be released 3.0 which features full project indexing!)
    and open the fatty MonoDevelop when i need to refactor/debug Unity projects
  34. mindlube

    mindlube

    Member

    Joined:
    Oct 3, 2008
    Messages:
    993
    Ive been working with Sublime Text for most of the day- not in Unity C# but just some Javascript + Html, and I have to admit this is is a pretty sweet editor and it's growing on me, (especially with sublemacspro Emacs-like plugin) :)
  35. Iamdain

    Iamdain

    New Member

    Joined:
    Feb 3, 2010
    Messages:
    60
    Subscribing to the thread. Started with ST two days ago, loving it and will be pimping it to other Unity devs I can convince..

    Just started some refactoring so will probably juggle it with MonoDevelop for now, would be nice to see some basic refactoring in a plugin. Beta 3 with the extra features based on project indexing is sweet!
  36. zombiegorilla

    zombiegorilla

    Member

    Joined:
    May 8, 2012
    Messages:
    1,705
    Another great one is TextMate2. It integrates very nicely with Unity (and everything else). It is the V2 build of TM, now open source.
  37. Thinksquirrel

    Thinksquirrel

    Member

    Joined:
    Feb 8, 2011
    Messages:
    880
    Don't think I linked it in this thread...but I have a nice script for ST integration from GitHub.

    https://github.com/jcmontoute/sublime-unity

    It's a modified version of some work done by the community, to be a bit more automatic and robust. I've been using Sublime Text exclusively these days - it's pretty great.
  38. rstehwien

    rstehwien

    Member

    Joined:
    Dec 30, 2007
    Messages:
    101
  39. Woland

    Woland

    Member

    Joined:
    Jul 16, 2012
    Messages:
    7
    Hi there,

    Sorry for being a little late to the party.
    I'm having problems toggling comments. It's not just the shortcut that doesn't work, but also Edit>Comment>Toggle Comment is not working, even though it does flash up when pressed. I'm on a Mac (10.8) BTW. Does anyone know how to fix this?
  40. Sisso

    Sisso

    Member

    Joined:
    Sep 29, 2009
    Messages:
    155
    I don't saw any reference in thread about multiples cursors.

    I am not a big fan, but this feature I always miss from any another editor.

    If you don't know what is this, take 5 minutes and learn, now!
  41. AndyLL

    AndyLL

    Member

    Joined:
    Aug 25, 2013
    Messages:
    38
    Although I find VS 2012 fine for 95% of my editing I could use a new Text Editor since my version of CodeWrite struggles a bit these days.

    3 things I have to have in a text editor:

    1) Column cut/copy/paste
    2) Easy macros with repeat - ( Brief was F7 start, F7 end, F8 run )
    3) Simple bookmarks.