C# Bundle for TextMate (version 0.03, Released 4/18)

 
Post new topic   Reply to topic    Unity Community Index // Scripting
View previous topic :: View next topic  
Author Message
Emanuel



Joined: 24 Feb 2006
Posts: 11
Location: Florida, USA

PostPosted: Fri Mar 31, 2006 7:50 pm    Post subject: C# Bundle for TextMate (version 0.03, Released 4/18) Reply with quote
Update: Version 0.03 Available 4/18/2006

After playing around with 10 million other editors, I've decided to make a C# bundle for TextMate. If you'd be interested in using it, it is available here. (URL Fixed on 4/19 -- previously was a 404 error)

Currently this bundle adds to text mate:

  • Syntax Highlighting for C#
  • Syntax Highlighting for Unity Classes (thanks Neil!)
  • Auto Completion for Unity Classes (thanks Neil!)
  • Symbol Menu, allowing you to jump around
  • Basic Snippets for C# -- short macros that save you time typing.

Version 0.03 Changes:

  • Types are now correctly highlighted in the parameter list.
  • Added new keywords 'set,' 'get,' 'as,' and 'throws'
  • Numerical Constants are highlighted now (courtesy of Neil)
  • Unity's types are now correctly highlighted. To use any Unity specific features from this version on, you must choose 'Unity (C#)' as the language for the file. The 'C#' language is used for pure C#.
  • Unity's types can be auto-completed. To use this, type a method partially and press Escape. Continue to press escape until TextMate has chosen the word you desire.
  • C# (and thus the Unity mode) has some very basic snippets defined for it. You can check them out in menu: Insert->Insert Snippet->C# . Snippets can be triggered by typing in the name found in parenthesis and then pressing tab. Snippets sometimes have multiple placeholders -- these can be accessed by pressing tab once for each place holder.

Known issues in 0.03:

  • set and get are highlighted as keywords outside of properties
  • properties are not included in the symbols list
  • no support for generics, yet.

If you end up trying this and having feedback, I'd love to hear! I'll edit this post again when I add a new version. The scopes are still up for debate, but quite a bit less than before. In addition, I'm still experimenting with the snippets. Very interested in hearing what people like and don't like.

Enjoy!


Last edited by Emanuel on Wed Apr 19, 2006 7:20 pm; edited 6 times in total
Back to top
View user's profile Send private message
lurid



Joined: 28 Aug 2005
Posts: 72
Location: Florida, USA

PostPosted: Sat Apr 01, 2006 4:20 am    Post subject: Reply with quote
Awesome! I just recently got hooked on TextMate too and got inspired to make a foundation for a Boo bundle.

For now, its just a copy/paste/edit of the Python bundle, but I'm hoping to find the time to add some Unityisms to it some day.
Back to top
View user's profile Send private message Visit poster's website
Emanuel



Joined: 24 Feb 2006
Posts: 11
Location: Florida, USA

PostPosted: Sun Apr 02, 2006 12:23 am    Post subject: Reply with quote
sweet. Thanks for the link. I'm hoping to do the same with my bundle as well. It'd be really nice to have fully functional bundles for Unity Smile. Lemme know if I can help with anything.
Back to top
View user's profile Send private message
greenland



Joined: 22 Oct 2005
Posts: 176
Location: /dev/random

PostPosted: Mon Apr 03, 2006 3:40 am    Post subject: Reply with quote
What does this program have over SubEthaEdit?
_________________
//sig
Back to top
View user's profile Send private message ICQ Number
lurid



Joined: 28 Aug 2005
Posts: 72
Location: Florida, USA

PostPosted: Mon Apr 03, 2006 4:39 am    Post subject: Reply with quote
arcaneinteractive wrote:
What does this program have over SubEthaEdit?


I like the way it presents its feature set. It feels much more mac-like and makes it easier to get to useful features (tab completion, auto-inserting text, etc). It also makes it easier to see what is available to you when you are in a specific text mode.

The way keyboard shortcuts and macros are handled seem much more intuitive to me too. I never used them much before TM, but perhaps because of the way it presents them, I've really picked up on using them in workflow.

I also like the way it integrates with the shell - most modes have their own understanding of how to execute (for scripts), or do other things based on the mode, and you can override most built in functionality quite easily (most internal functionality is exposed through shell scripting).

I'm still stuck putting in 60-70 hours with a contract, but I can't wait to get back in to Unity and trying to better integrate the two - I think there is a lot of promise there.

Russ
Back to top
View user's profile Send private message Visit poster's website
Emanuel



Joined: 24 Feb 2006
Posts: 11
Location: Florida, USA

PostPosted: Tue Apr 04, 2006 2:04 am    Post subject: Reply with quote
arcaneinteractive wrote:
What does this program have over SubEthaEdit?


(disclaimer: I've only been using TextMate for a few months Smile )

For me, I think it definitely think the 'feel' of the program is excellent. It is designed well. I spent a bit of time playing with Ruby on Rails (a web programming framework) in TextMate, and I really used the ability to insert code snippets (called triggers) a ton.

I'm a guy who's really used to using big IDE's like Visual Studio and Xcode, but I really like the cleanness of just using a text editor. Of course, in most text editors, you lose a lot of the nice editing features (Auto completion, for example). Or you have Vi or Emacs which come across to me as being very unintuitive.

TextMate seems to be a nice compromise of the two, and is extremely customizable.
Back to top
View user's profile Send private message
NCarter



Joined: 03 Sep 2005
Posts: 680
Location: London, UK

PostPosted: Sat Apr 15, 2006 11:00 pm    Post subject: Reply with quote
This is pretty good. Thanks for making this available, Emanuel!

On the recommendation of certain friends of mine, I'm trying out TextMate at the moment, and this is certainly better than the standard Mono/C# behaviour. I can't imagine why the standard one doesn't bother to populate the function popup....

I've fiddled around with your bundle to add a few more C# keywords (as, get, set etc.) and Unity class names, as well as adding the latter for autocompletion. I can pass these modifications back to you if you like, although you might want to wait until I've understood how TextMate works a bit better, so that I actually know what I'm doing when I'm editing the files!

Incidentally, is it me, or does Unity not always notice when TextMate has saved the file? Sometimes it does, but frequently Unity doesn't respond when I hit save, and the script is only recompiled when I switch back to Unity.

_________________
Neil Carter
Nether - Mac games and comic art
Back to top
View user's profile Send private message Visit poster's website AIM Address
Emanuel



Joined: 24 Feb 2006
Posts: 11
Location: Florida, USA

PostPosted: Mon Apr 17, 2006 11:01 pm    Post subject: Reply with quote
Thanks Neil.

As far as I know, I didn't think that there was a standard Mono/C# bundle, which is why I ended up creating this one. If you know of another TextMate bundle, I definitely would love to try it out.

How did you add the set and get items to the bundle? What did you scope them as? I did not include set/get as keywords because they are valid identifiers when used outside of properties (and didn't get to detect them properly). I completely missed 'as' and apparently 'throw' as well, lol. I'll make sure those two get placed into the next version.

I'd be more than happy to use the your list of types for Unity. All that stuff in my version is going into a separate language (I'll most likely call it 'Unity (C#)') that will make reference to the separate C# language. That way, the bundle will do the right thing when you're using Mono and not Unity.

I'd also like to eventually change the behavior of autocomplete using TextMate to take what you've already typed into consideration when displaying the list of options. I get the impression that it doesn't do this on its own from reading the documentation. Its on my todo list somewhere.

Thanks a bunch for the feedback! =)
Back to top
View user's profile Send private message
Mortoc



Joined: 03 Nov 2006
Posts: 48
Location: Boston, MA

PostPosted: Tue Jan 08, 2008 4:44 pm    Post subject: Extension Reply with quote
Here's a useful snippet for Textmate.

In the bundle editor, add a command "GoToDocumentation" or whatever you wanna call it. I assigned the keyboard shortcut Command + ' (same as Unitron).

Code:
open "http://unity3d.com/support/documentation/ScriptReference/30_search.html?q=$TM_SELECTED_TEXT"


This gives you the same "Look up selected in the script reference" functionality that Unitron comes with. I use this in C#, but it'll work in Boo or Javascript as well.
Back to top
View user's profile Send private message
Jorgen



Joined: 13 Dec 2005
Posts: 38
Location: copenhagen

PostPosted: Wed May 21, 2008 2:00 pm    Post subject: Re: Extension Reply with quote
Mortoc wrote:

Code:
open "http://unity3d.com/support/documentation/ScriptReference/30_search.html?q=$TM_SELECTED_TEXT"


or even better, select "Output: Show as HTML" for the command, and
Code:
URL="http://unity3d.com/support/documentation/ScriptReference/30_search.html?q=$TM_SELECTED_TEXT"
"<meta http-equiv='Refresh' content='0;$URL'>"
Back to top
View user's profile Send private message Visit poster's website
Joe @ ByDesign Games



Joined: 13 Oct 2005
Posts: 695
Location: Land of wine & cheese

PostPosted: Sun Apr 26, 2009 10:49 am    Post subject: Reply with quote
The TextMate section of the user wiki has been updated to help keep TM bundle releases organized.

Please upload & maintain your TM bundle on the Wiki (filling out any missing info), rather than uploading here on the forum.

Your help will aid the effort to maintain a single source for TM Unity bundles, instead of having a bunch of misc. forum posts with fragmented versions spread about that users have to hunt to find.

Media Wikis are great for this sort of thing! Let's use it! Smile

Thanks!

_________________
ByDesign Games
Fresh Fun Games
http://www.bydesigngames.com
Back to top
View user's profile Send private message Visit poster's website
Joe @ ByDesign Games



Joined: 13 Oct 2005
Posts: 695
Location: Land of wine & cheese

PostPosted: Fri May 01, 2009 11:13 am    Post subject: Reply with quote
Any word on this gents?
_________________
ByDesign Games
Fresh Fun Games
http://www.bydesigngames.com
Back to top
View user's profile Send private message Visit poster's website
lab75.jp



Joined: 20 Jul 2007
Posts: 3
Location: Frankfurt a.M. / Germany

PostPosted: Thu Dec 10, 2009 10:43 pm    Post subject: Reply with quote
hey guys
is there a newer version of the textmate c# bundle? couldn't find anything yet and the existing one isn't complete i guess..

thanks+cheers,
marco

_________________
--------------------

we are looking for unity3d developers and designers in europe.

work www.lab75.jp
private www.zero.io
Back to top
View user's profile Send private message Visit poster's website AIM Address
Post new topic   Reply to topic    Unity Community Index // Scripting All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum