ccw-ide / ccw

Counterclockwise is an Eclipse plugin helping developers write Clojure code
https://github.com/laurentpetit/ccw/wiki/GoogleCodeHome
Eclipse Public License 1.0
220 stars 50 forks source link

Square brackets in comments with paredit are not behaving correctly #843

Open noncom opened 9 years ago

noncom commented 9 years ago

I have noticed that when paredit is on and I type [ in a comment it becomes [|]. Then, if I want to leave it like that and move on and I type ], it becomes []|] instead of expected []| or even [] |. This behavior differs from the behavior in code and is not really appropriate (imho).

laurentpetit commented 9 years ago

Indeed. Question is: what should the behavior be in your mind? Same as in code, or no addition of closing paren at all? The latter is certainly easier to get at from an implementation point of view.

Le dimanche 23 août 2015, noncom notifications@github.com a écrit :

I have noticed that when paredit is on and I type [ in a comment it becomes [|]. Then, if I want to leave it like that and move on and I type ], it becomes []|] instead of expected []| or even [] |. This behavior differs from the behavior in code and is not really appropriate (imho).

— Reply to this email directly or view it on GitHub https://github.com/laurentpetit/ccw/issues/843.

Laurent Petit

noncom commented 9 years ago

I think same as in code is more appropriate since that's the nature of how [ and ] are used even in comments. However, if this is not straightforward to implement, then the simple solution to prevent the addition of the closing pair is ok since this already fixes the primary bug and removes the distraction that it provides to the user. And the better (code-like) behavior is desirable but probably not worth to implement while there are more important things to do.