paredit-like mode

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

paredit-like mode

andrea crotti-2
I like paredit-mode when I write in elisp, but unfortunately for python
is not perfect, is there anything similiar we could use for python mode?

Thanks,
Andrea

_______________________________________________
Python-mode mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/python-mode
Reply | Threaded
Open this post in threaded view
|

Re: paredit-like mode

Andreas Röhler-2
Am 01.12.2011 00:25, schrieb Andrea Crotti:
> I like paredit-mode when I write in elisp, but unfortunately for python
> is not perfect, is there anything similiar we could use for python mode?
>
> Thanks,
> Andrea
>

good idea, think some of them exists already resp. isn't far away.

as paredit offers a lot, some code example
before - after
might help implementing it.

Will make a Blueprint meanwhile for the matter.

Andreas

--
http://launchpad.net/python-mode
http://launchpad.net/s-x-emacs-werkstatt/

_______________________________________________
Python-mode mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/python-mode
Reply | Threaded
Open this post in threaded view
|

Re: paredit-like mode

andrea crotti-2
On 12/01/2011 11:18 AM, Andreas Röhler wrote:

>
>
> good idea, think some of them exists already resp. isn't far away.
>
> as paredit offers a lot, some code example
> before - after
> might help implementing it.
>
> Will make a Blueprint meanwhile for the matter.
>
> Andreas

Thanks,
first I thought we could use paredit itself customizing its behaviour,
but looking at the
code there isn't even one defcustom, which makes me think that its
behaviour is
not really customizable.

There are many examples in other code (cc-mode for example), in general
using the abbrev-table
might be easy, but maybe not so flexible.

For things like
"""

"""

I use yasnippet actually, but for opening / closing brackets is not ideal..
_______________________________________________
Python-mode mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/python-mode
Reply | Threaded
Open this post in threaded view
|

Re: paredit-like mode

Andreas Röhler-2
Am 01.12.2011 17:44, schrieb Andrea Crotti:
 > Well I would like to have electric parens,

you may have a look into the components-branch, which delivers
a python-components-skeletons.el - lifted from python.el

it has a heisenbug, deleting all my abbrevs occasionally,
thus de-activated


electric " and maybe electric
 > :

is `py-electric-colon' what you are looking for here?

(that's not so important).
 > Just inserting a closing parens when you open one is not enough
 > unfortunately, that's
 > why paredit also smartly deletes them.
 >

need some code example

_______________________________________________
Python-mode mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/python-mode
Reply | Threaded
Open this post in threaded view
|

Re: paredit-like mode

Brendan Miller-5
In reply to this post by andrea crotti-2
The mode you are looking for is called autopair:
http://code.google.com/p/autopair/
Kind of a scaled back paredit that works with any language.
On Wed, Nov 30, 2011 at 3:25 PM, Andrea Crotti
<[hidden email]> wrote:

> I like paredit-mode when I write in elisp, but unfortunately for python
> is not perfect, is there anything similiar we could use for python mode?
>
> Thanks,
> Andrea
>
> _______________________________________________
> Python-mode mailing list
> [hidden email]
> http://mail.python.org/mailman/listinfo/python-mode
_______________________________________________
Python-mode mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/python-mode
Reply | Threaded
Open this post in threaded view
|

Re: paredit-like mode

andrea crotti-2
On 12/02/2011 08:18 AM, Brendan Miller wrote:
> The mode you are looking for is called autopair:
> http://code.google.com/p/autopair/
> Kind of a scaled back paredit that works with any language.
>


Thanks a lot, exactly what I was looking for :)
_______________________________________________
Python-mode mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/python-mode