Re: [Pydev-code] Wrap paragraph Pydev script available for testing
Brought to you by:
fabioz
From: Fabio Z. <fa...@gm...> - 2006-05-21 11:08:00
|
On 5/21/06, Don Taylor <nos...@gm...> wrote: > > Folks: > > I have written a Pydev script that wraps comment paragraphs in Python or > Jython in Eclipse. I would be grateful if you could try it out and let > me know about any bugs or suggestions for improving the code. > Hi Don, I've checked it, and I have some suggestions: 1. Instead of having 80 as the default, you could use the preferences the user specified as its print margin: from org.python.pydev.plugin import PydevPlugin from org.eclipse.ui.texteditor import AbstractDecoratedTextEditorPreferenceConstants cols =3D PydevPlugin.getChainedPrefStore().getInt( AbstractDecoratedTextEditorPreferenceConstants.EDITOR_PRINT_MARGIN_COLUMN); 2. When you try to indent the following: #_line_to_wrap1_eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee= eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee # class Foo: # def m1(): # pass #_line_to_wrap2_eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee= eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee if you start doing it at the first line, it will stop there, and not get th= e full comment block (so, I think it could indent all that started with '#' + character, instead of bailing out when it finds the first '#' + space) Cheers, Fabio |