> 'jumping to a symbol's definition (and back again)? Those didn't seem to be > there last time, and I'd struggle to live without them on a project of any > size.' > > Besides paredit, this is absolutely the most important feature for me > day-to-day. Nothing will replace emacs unless it has that. The emacs one > follows a stack-discipline, which is brilliant, and can even follow into > dependency jars.
Yes, Sublime Text (both 2 and 3) have the ability to jump to a symbol (there's probably a way to switch to the previous view also, not sure what the shortcut is for that). ST3 has a built-in "Go to definition" menu item that ST2 doesn't have. I haven't tried that yet with Clojure though because a bunch of awesome ST2 plugins haven't yet been ported to ST3. ST2 has an awesome plugin (that just merged a patch I sent in today) called Find Function Definition. It's a great hack for implementing "Go to definition". To get it to work nicely with clojure, just copy/paste this into your User Settings for that plugin: { "definitions": [ // the extra space at the end is important! // otherwise foo will match a function def of foo-bar "(defn $NAME$ ", "(defn- $NAME$ ", "(defn ^URL $NAME$ ", "(defn ^String $NAME$ ", "(defn ^File $NAME$ ", "(defmacro $NAME$ ", "class $NAME$ ", // java class // but sometimes they will put a newline instead of a space // so if the above fail, try these: "(defmacro $NAME$", "(defn $NAME$", "(defn- $NAME$", "(defn ^URL $NAME$", "(defn ^String $NAME$", "(defn ^File $NAME$", // if jumping becomes too slow, comment out the following "(def $NAME$ ", "(defonce $NAME$ ", "(declare $NAME$ " ] } And then copy/paste this into your Syntax Specific User settings for Clojure (open a .clj file, then find that menu item under Preferences > Settings — More): { "extensions": ["cljs", "clj", "cljx"], "word_separators": "./\\()\"':,.;~@%^&|+=[]{}`~" } That might not be a perfect list of characters that act as word separators in Clojure, but it has covered all the cases I've tried so far. Bind whatever keyboard shortcut you want to the "go_to_function" command, and then after positioning the caret over a function or var name, hit the shortcut. It will search through all of files in the navbar on the left (i.e. your project) for one of the above strings, replacing $NAME$ with the name of the symbol at the caret. Obviously this won't search within your mavin jar files, so what I've done is simply extracted the source out of them for dependencies that I use and placed those files within my project in a folder that's ignored by git. Thus, "Find Function Definition" now works on just about every symbol I try it on! :-) I might make a blog post about my ST2 Clojure setup if there's any interest in that. > 4. On Sublime Text (ST) > -------------------------------- > > Non-free. I'd say it's free for people who don't care about nag prompts. If you don't want to support the developer, you can use all the features for as long as you like at the cost of having to click "Cancel" at a nag prompt every so often. Cheers! Greg -- Please do not email me anything that you are not comfortable also sharing with the NSA. On Jul 25, 2013, at 8:32 PM, Gary Trakhman <gary.trakh...@gmail.com> wrote: > 'jumping to a symbol's definition (and back again)? Those didn't seem to be > there last time, and I'd struggle to live without them on a project of any > size.' > > Besides paredit, this is absolutely the most important feature for me > day-to-day. Nothing will replace emacs unless it has that. The emacs one > follows a stack-discipline, which is brilliant, and can even follow into > dependency jars. > > > On Thu, Jul 25, 2013 at 8:27 PM, Korny Sietsma <ko...@sietsma.com> wrote: > Indeed - I was using a community-edition intellij setup the other day, and > only realised when I went to edit some JavaScript, and found some features > missing (like code indenting). > > We use intellij (mostly) in our team at work, and I use emacs (mostly) at > home. > > My current take on this endless debate: > > Intellij is ok. For multi-language projects it's probably still the best > option - it does a great job with Java, JavaScript, html, css. The clojure > support, with the leiningen plugin, works most of the time - with a few > hassles: > - jump to definition breaks sometimes, especially if you use "use" or > "require :all" - for some reason it can understand prefixed namespaces a lot > better. > - indenting isn't nearly as good as emacs > - it doesn't use a long-running repl for tasks like compilation, so you have > to wait for the clojure startup a lot; every time you re-run tests for > example. > - a few language features break their parser - inine bigdecimals for a start, > adding "0.01M" tends to break syntax highlighting > - you have to use the leiningen plugin to sync up your project dependencies, > and manually re-sync when things change > - the leiningen plugin breaks if you have more than one clojure module in a > project - not a problem for everyone, but very annoying for us! > > Emacs is powerful, and fast (not sure where the "bloat" comments come from, > it takes less than 3 seconds to load on my MacBook Pro, and that's usually > once per session, so I don't care much. > However, it has a horrible learning curve - I'm past the worst of it, but > it's a struggle to learn, and only something you'd do if you are keen. Fine > for the solo developer, but not much good for a team, especially in a > consulting situation - I can't go to the client company's developers and say > "here's this awesome new language to use - oh, and you also need to learn > emacs..." :-} > > Also Emacs sucks for Java development, and isn't nearly as good as Intellij > for JavaScript, html, and css. I also miss all the nice things you get from > a real gui - graphical diff markings, subtle ui indicators for VCS changes, > tooltips that pop up; and mostly I really miss having a tree-view of the > project when I'm working in emacs - speedbar is a very very poor replacement! > > Sublime, last time I tried, had a very nice UI and a great plugin system - > but the clojure stuff seemed fairly broken. I couldn't get the repl to work > properly; I'm glad to hear it's working now. Does it support autcompletion, > and jumping to a symbol's definition (and back again)? Those didn't seem to > be there last time, and I'd struggle to live without them on a project of any > size. > > CounterClockwise is nice - I tried it a few months back, and it seemed like a > good environment - but Eclipse is ugly and painful to use compared to > IntelliJ, and as my team is building a multi-language project, we can't avoid > using the non-clojure bits. If I had a pure clojure project, in a team > environment, I'd definitely consider it. > > - Korny > > > > On 26 July 2013 09:26, Colin Fleming <colin.mailingl...@gmail.com> wrote: > Nope, it's perfectly functional as long as all you want is "basic" > functionality - Java, XML/XPath/XSLT, Git/SVN, Android, Maven/Ant, Groovy, > JUnit/TestNG and of course Clojure if you install La Clojure. If you want any > of the Enterprise Java stuff you have to go to the Ultimate edition. Probably > the most obviously missing thing is HTML/Javascript support. > > > On 26 July 2013 11:18, Cedric Greevey <cgree...@gmail.com> wrote: > On Thu, Jul 25, 2013 at 7:06 PM, Colin Fleming <colin.mailingl...@gmail.com> > wrote: > Laurent is correct - both the IntelliJ community edition and La Clojure are > Apache licensed. > > > On 26 July 2013 11:02, Laurent PETIT <laurent.pe...@gmail.com> wrote: > Hello Cedric, > > >> 1. On IntelliJ > >> ----------------- > > > > > > Not free software. > > AFAICT, the "Community Edition" is free software, and all that is > required to use Clojure. > > Huh. That's news to me. The one time I evaluated IntelliJ, there was no sign > of this. > > It isn't severely crippled, though, is it? > > > -- > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to clojure@googlegroups.com > Note that posts from new members are moderated - please be patient with your > first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > > > > > -- > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to clojure@googlegroups.com > Note that posts from new members are moderated - please be patient with your > first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > > > > > > -- > Kornelis Sietsma korny at my surname dot com http://korny.info > .fnord { display: none !important; } > > -- > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to clojure@googlegroups.com > Note that posts from new members are moderated - please be patient with your > first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > > > > > -- > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to clojure@googlegroups.com > Note that posts from new members are moderated - please be patient with your > first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > >
signature.asc
Description: Message signed with OpenPGP using GPGMail