Re: ANN: LispIndent, jEdit plugin that indents lisp code

2012-10-23 Thread Jonathan Fischer Friberg

 BTW, I created the beginnings of a CDS development tools guide
 https://github.com/clojuredocs/cdhttps://github.com/clojuredocs/cds/blob/master/articles/ecosystem/development_tools.md
 s/blob/master/articles/ecosystem/development_tools.mdhttps://github.com/clojuredocs/cds/blob/master/articles/ecosystem/development_tools.mdand
  added some notes in there re. jEdit + LispIndent.


Nice!
Hopefully this will make it easier for new users to get started.
(unless they drown in the amount of editors/IDEs you can choose from :) )

Today I updated the LispIndent indenting so that it reads one line at a
time,
instead of strings of length one at a time.
This makes it possible to remove characters such as \( and comments.
It is big change however, it requires testing. :)

Jonathan

-- 
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

Re: ANN: LispIndent, jEdit plugin that indents lisp code

2012-10-18 Thread Jonathan Fischer Friberg
Presets have been implemented in the latest version.
It's selectable in the plugin options.

The clojure preset should make LispIndent more or less exactly emacs.
(I think, I still haven't tested emacs - will check out your guide soon
John :) )

Jonathan


On Thu, Oct 18, 2012 at 5:55 AM, John Gabriele jmg3...@gmail.com wrote:

 On Wednesday, October 17, 2012 7:39:26 PM UTC-4, Jonathan Fischer Friberg
 wrote:

 The plugin has been updated to support function argument indenting.
 It is configurable in the plugin options.


 Oooh, this is nice. :) I selected the indent to function arguments by
 default radio button, checked the box to indent if operator matches and
 filled in defn, and indenting works wonderfully so far. Will try this out
 some more.



 Next, I think I will implement presets. The idea is that
 each preset corresponds to one language. That way, LispIndent
 can still be language-independent. Users will also be spared of
 implementing their own regexes. :)

 What do you think about this?


 Oh, do you mean having that indent two spaces if operator matches text
 box pre-filled when selecting a given lisp-like language? That would be
 great, and would save users a lot of time having to figure out what should
 go in there while they're learning the language. :)

 Great stuff here. Particularly for those new to Clojure who'd like an easy
 GUI editor.

 ---John

  --
 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 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

Re: ANN: LispIndent, jEdit plugin that indents lisp code

2012-10-18 Thread John Gabriele
On Thursday, October 18, 2012 10:18:09 AM UTC-4, Jonathan Fischer Friberg 
wrote:

 Presets have been implemented in the latest version.
 It's selectable in the plugin options.


Works nicely. Thanks, Jonathan!

BTW, I created the beginnings of a CDS development tools guide 
https://github.com/clojuredocs/cds/blob/master/articles/ecosystem/development_tools.md
 
and added some notes in there re. jEdit + LispIndent.

---John

-- 
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

Re: ANN: LispIndent, jEdit plugin that indents lisp code

2012-10-17 Thread John Gabriele
On Wednesday, October 17, 2012 10:26:01 AM UTC-4, Jonathan Fischer Friberg 
wrote:

 Hi,

 As I were unable to find a way to indent lisp code in jEdit, I decided to 
 write a plugin for this purpose.
 It's called LispIndent and can be found here:

 https://github.com/odyssomay/LispIndent

 Please report if you have any problems!


Very cool! Thanks, Jonathan. Particularly good install/setup instructions. 
:)

Though I typically use Emacs, this made me go and install the latest jEdit 
(5.0pre1) to try it out. :)

One thing I notice right off the bat though is that it doesn't properly 
vertically align function args. That is, if I type

(foo bar

and hit Enter, I expect the next character I type to go right under that 
b in bar. But LispIndent gives me a 2-space indent instead.

Is there a way to configure LispIndent to vertically align args?

Thanks,
---John

-- 
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

Re: ANN: LispIndent, jEdit plugin that indents lisp code

2012-10-17 Thread Jonathan Fischer Friberg
Not currently, no.

I'm not really sure how to detect when to use 2 spaces, and when to align
arguments.
I also feel that no editor really has nailed it, when it comes to
deciding that. (it's also personal preference)

For example, I personally think that do, - and - should use
vertically aligned arguments,
but I don't think any editor does this (disclaimer: I have not tried emacs).

Maybe I should just make it completely configurable with regexes?

Jonathan

P.S. I'm really happy that you tried it! :)

On Wed, Oct 17, 2012 at 7:33 PM, John Gabriele jmg3...@gmail.com wrote:

 On Wednesday, October 17, 2012 10:26:01 AM UTC-4, Jonathan Fischer Friberg
 wrote:

 Hi,

 As I were unable to find a way to indent lisp code in jEdit, I decided to
 write a plugin for this purpose.
 It's called LispIndent and can be found here:

 https://github.com/odyssomay/**LispIndenthttps://github.com/odyssomay/LispIndent

 Please report if you have any problems!


 Very cool! Thanks, Jonathan. Particularly good install/setup instructions.
 :)

 Though I typically use Emacs, this made me go and install the latest jEdit
 (5.0pre1) to try it out. :)

 One thing I notice right off the bat though is that it doesn't properly
 vertically align function args. That is, if I type

 (foo bar

 and hit Enter, I expect the next character I type to go right under that
 b in bar. But LispIndent gives me a 2-space indent instead.

 Is there a way to configure LispIndent to vertically align args?

 Thanks,
 ---John

  --
 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 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

Re: ANN: LispIndent, jEdit plugin that indents lisp code

2012-10-17 Thread John Gabriele
On Wednesday, October 17, 2012 2:17:50 PM UTC-4, Jonathan Fischer Friberg 
wrote:

 Not currently, no.

 I'm not really sure how to detect when to use 2 spaces, and when to align 
 arguments.
 I also feel that no editor really has nailed it, when it comes to 
 deciding that. (it's also personal preference)


My first guess is that it should by default align arguments, but then have 
some special cases where it doesn't, such as with `defn`.

Though, I can see that if you add special cases, the plug-in would probably 
be better named ClojureIndent rather than LispIndent (which may imply 
Common Lisp, for that matter).
 

 Maybe I should just make it completely configurable with regexes?


I don't know if the Emacs clojure-mode is user-configurable in that way. I 
haven't needed to change it. Most Clojure users seem to indent in pretty 
much the same way, fwict, which is probably pretty close to how Emacs does 
it automatically. I haven't tried Eclipse.

If you want to try out Emacs to see how it does indentation (for comparison 
to LispIndent), I wrote a quick guide that might be useful for you: 
http://www.unexpected-vortices.com/clojure/10-minute-emacs-for-clojure.html 
.

---John

-- 
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

Re: ANN: LispIndent, jEdit plugin that indents lisp code

2012-10-17 Thread Jack Moffitt
 I don't know if the Emacs clojure-mode is user-configurable in that way. I
 haven't needed to change it. Most Clojure users seem to indent in pretty
 much the same way, fwict, which is probably pretty close to how Emacs does
 it automatically. I haven't tried Eclipse.

All the lisp and scheme modes in Emacs are configurable in this way.
Here's the relevant variable from clojure-mode:

https://github.com/technomancy/clojure-mode/blob/master/clojure-mode.el#L771-845

jack.

-- 
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


Re: ANN: LispIndent, jEdit plugin that indents lisp code

2012-10-17 Thread Jonathan Fischer Friberg
The plugin has been updated to support function argument indenting.
It is configurable in the plugin options.

Next, I think I will implement presets. The idea is that
each preset corresponds to one language. That way, LispIndent
can still be language-independent. Users will also be spared of
implementing their own regexes. :)

What do you think about this?

Jonathan

On Wed, Oct 17, 2012 at 8:54 PM, Jack Moffitt j...@metajack.im wrote:

  I don't know if the Emacs clojure-mode is user-configurable in that way.
 I
  haven't needed to change it. Most Clojure users seem to indent in pretty
  much the same way, fwict, which is probably pretty close to how Emacs
 does
  it automatically. I haven't tried Eclipse.

 All the lisp and scheme modes in Emacs are configurable in this way.
 Here's the relevant variable from clojure-mode:


 https://github.com/technomancy/clojure-mode/blob/master/clojure-mode.el#L771-845

 jack.

 --
 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 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

Re: ANN: LispIndent, jEdit plugin that indents lisp code

2012-10-17 Thread John Gabriele
On Wednesday, October 17, 2012 7:39:26 PM UTC-4, Jonathan Fischer Friberg 
wrote:

 The plugin has been updated to support function argument indenting.
 It is configurable in the plugin options.


Oooh, this is nice. :) I selected the indent to function arguments by 
default radio button, checked the box to indent if operator matches and 
filled in defn, and indenting works wonderfully so far. Will try this out 
some more.
 


 Next, I think I will implement presets. The idea is that
 each preset corresponds to one language. That way, LispIndent
 can still be language-independent. Users will also be spared of
 implementing their own regexes. :)

 What do you think about this?


Oh, do you mean having that indent two spaces if operator matches text 
box pre-filled when selecting a given lisp-like language? That would be 
great, and would save users a lot of time having to figure out what should 
go in there while they're learning the language. :)

Great stuff here. Particularly for those new to Clojure who'd like an easy 
GUI editor.

---John

-- 
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