Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Sublime Text

Discussion in 'General Discussion' started by jedy, May 15, 2012.

  1. jedy

    jedy

    Joined:
    Aug 1, 2010
    Posts:
    579
    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_

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

    jedy

    Joined:
    Aug 1, 2010
    Posts:
    579
    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. Demigiant

    Demigiant

    Joined:
    Jan 27, 2011
    Posts:
    3,239
    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

    Joined:
    Nov 21, 2009
    Posts:
    1,121
    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

    Joined:
    Aug 1, 2010
    Posts:
    579
    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. Demigiant

    Demigiant

    Joined:
    Jan 27, 2011
    Posts:
    3,239
    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

    Joined:
    Aug 1, 2010
    Posts:
    579
    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

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

    DallonF

    Joined:
    Nov 12, 2009
    Posts:
    620
    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. Demigiant

    Demigiant

    Joined:
    Jan 27, 2011
    Posts:
    3,239
    Got it! Currently using it only for quick CSS editing, but already loving it :)
     
  12. dogzerx2

    dogzerx2

    Joined:
    Dec 27, 2009
    Posts:
    3,964
    I like the minimap!
     
  13. jedy

    jedy

    Joined:
    Aug 1, 2010
    Posts:
    579
    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. Demigiant

    Demigiant

    Joined:
    Jan 27, 2011
    Posts:
    3,239
    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

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

    rstehwien

    Joined:
    Dec 30, 2007
    Posts:
    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

    Joined:
    Aug 1, 2010
    Posts:
    579
    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. Demigiant

    Demigiant

    Joined:
    Jan 27, 2011
    Posts:
    3,239
    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

    Joined:
    Aug 1, 2010
    Posts:
    579
    Code (csharp):
    1. "/".encode('string-escape')
    This could work.
     
  20. Demigiant

    Demigiant

    Joined:
    Jan 27, 2011
    Posts:
    3,239
    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

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

    AngryOrange

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

    Demigiant

    Joined:
    Jan 27, 2011
    Posts:
    3,239
    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

    Joined:
    Jan 30, 2012
    Posts:
    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. Demigiant

    Demigiant

    Joined:
    Jan 27, 2011
    Posts:
    3,239
    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

    Joined:
    Aug 1, 2010
    Posts:
    579
    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. Demigiant

    Demigiant

    Joined:
    Jan 27, 2011
    Posts:
    3,239
    Mhmm sounds yummy. Hope this happens soon :)
     
  28. AngryOrange

    AngryOrange

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

    bngames

    Joined:
    Jul 3, 2012
    Posts:
    67
  30. mindlube

    mindlube

    Joined:
    Oct 3, 2008
    Posts:
    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. Demigiant

    Demigiant

    Joined:
    Jan 27, 2011
    Posts:
    3,239
    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

    Joined:
    Oct 3, 2008
    Posts:
    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. StefanoCecere

    StefanoCecere

    Joined:
    Jun 10, 2011
    Posts:
    210
    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

    Joined:
    Oct 3, 2008
    Posts:
    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

    Joined:
    Feb 3, 2010
    Posts:
    90
    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

    Moderator

    Joined:
    May 8, 2012
    Posts:
    9,042
    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. lilymontoute

    lilymontoute

    Joined:
    Feb 8, 2011
    Posts:
    1,181
    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

    Joined:
    Dec 30, 2007
    Posts:
    101
  39. AllonVR

    AllonVR

    Joined:
    Jul 16, 2012
    Posts:
    28
    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

    Joined:
    Sep 29, 2009
    Posts:
    196
    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

    Joined:
    Aug 25, 2013
    Posts:
    75
    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.