Hi Colin, Thanks for your explanation and tips!
I'd totally use it now if I had a haptic feedback keyboard where it vibrated under my finger every time I attempted to type an extra parenthesis. That would make it feel natural, but yes with time I may get used to the structure it enforces and it should contribute to higher level of recognition. It's a pretty interesting concept if applied consistently. On Tue, Feb 17, 2015 at 8:26 AM, Colin Yates <[email protected]> wrote: > Hi Marc, > > The prevention of typing brackets is related to the concept of > "structural editing". You aren't editing text you are editing > s-expressions (e.g. lists). The most common implementation of this is > called "paredit", Cursive calls it "structural editing". It is > incredibly frustrating and annoying until it clicks and then it is > invaluable :). > > However, to turn it off you can click on the toolbar at the bottom > right which says "Structural: On". To 'work around' it you can always > type the opening bracket which will insert the closing bracket, then > highlight and delete the closing bracket. The whole point of > structural editing however is that you never need to do this as it > won't ever let you get out of balance. > > In terms of nested defns - yeah, Clojure really wants you to define > them at the top level. You can have lexically scoped functions using > (letfn [...]) or (let [my-fn (fn...)]) but nested defs/defns is bad > form. > > Give structural editing a go - it really does make things a whole lot > easier ;). > > On 17 February 2015 at 16:19, Marc Fawzi <[email protected]> wrote: > > > > I did try it! and I was impressed, but one thing it did wasn't right for > me. > > Here is my story: > > > > I had to give it up because, being a noob, I wanted to be able to > > accidentally type extra parenthesis and see that I did make a mistake > (red > > underline or something like that) as opposed to being prevented from > typing > > the extra parenthesis. It's a somewhat surprising approach to disable > > keyboard input, although I admit I did take the same approach in my self > > built special-purpose editor, but then learned that it wasn't the best > way. > > I thought IntelliJ died on me and wasn't responding, so I restarted it > and > > still couldn't type that extra parenthesis. Being a noob I had no idea > that > > wat I was trying to do was wrong. Cursive is preemptive like that and it > can > > be surprising and even interruptive if your style is to paint with a > think > > brush then refine/remove errors. Is that a configurable thing? > > > > Also, when I had functions defined within a main function (I am still > > thinking in JS way and it's probably not best practice to do that in > Clojure > > but I wanted to make some functions private in a library I was building) > and > > Cursive was not able to detect the definitions of the inner functions so > > somewhere below the definitions where I actually call the functions they > > were getting highlighted as unknown. That's what I had tweeted > > @cursiveclojure about on Friday, but I failed to floow up (sorry) > > > > I'd rather use locally produced software and tools :) but that's my > feedback > > and I hope to reevaluate based on your response. > > > > Thanks for the good work and for sharing it! > > > > Marc > > > > On Tue, Feb 17, 2015 at 7:53 AM, Colin Yates <[email protected]> > wrote: > >> > >> I think you mean https://cursiveclojure.com/ :) > >> > >> On 17 February 2015 at 15:28, Alan Moore <[email protected]> wrote: > >> > Marc, > >> > > >> > You mention using La Clojure - while I have nothing against it you > >> > should really check out Cursive. Colin has done a fantastic job with > it. > >> > See: > >> > > >> > www.cursiveclijure.com > >> > > >> > Just be sure to uninstall La Clojure first. If you have questions > there > >> > is a mailing list for it: > >> > > >> > https://cursiveclojure.com/mailinglist.html > >> > > >> > Alan > >> > > >> > -- > >> > Note that posts from new members are moderated - please be patient > with > >> > your first post. > >> > --- > >> > You received this message because you are subscribed to the Google > >> > Groups "ClojureScript" group. > >> > To unsubscribe from this group and stop receiving emails from it, send > >> > an email to [email protected]. > >> > To post to this group, send email to [email protected]. > >> > Visit this group at http://groups.google.com/group/clojurescript. > >> > >> -- > >> Note that posts from new members are moderated - please be patient with > >> your first post. > >> --- > >> You received this message because you are subscribed to the Google > Groups > >> "ClojureScript" group. > >> To unsubscribe from this group and stop receiving emails from it, send > an > >> email to [email protected]. > >> To post to this group, send email to [email protected]. > >> Visit this group at http://groups.google.com/group/clojurescript. > > > > > > -- > > Note that posts from new members are moderated - please be patient with > your > > first post. > > --- > > You received this message because you are subscribed to the Google Groups > > "ClojureScript" group. > > To unsubscribe from this group and stop receiving emails from it, send an > > email to [email protected]. > > To post to this group, send email to [email protected]. > > Visit this group at http://groups.google.com/group/clojurescript. > > -- > Note that posts from new members are moderated - please be patient with > your first post. > --- > You received this message because you are subscribed to the Google Groups > "ClojureScript" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/clojurescript. > -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message because you are subscribed to the Google Groups "ClojureScript" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/clojurescript.
