Re: [Python-mode] code/macros to reformat code
Am 11.05.2011 18:24, schrieb m h: On Wed, May 11, 2011 at 12:20 AM, Andreas Röhler andreas.roeh...@online.de wrote: Am 11.05.2011 00:44, schrieb m h: Folks- I was wondering if anyone has some code floating around to reformat code after the code passes a certain column (say 79 or 80). What I'm looking for is reformatting long lines. I'd like to convert something like (assume the k of junk is around 78): my_string = foo bar baz ... junk stuff etc to: my_string = foo bar baz ... junk stuff etc Hi, assume your result must read: my_string = foo bar baz ... junk stuff etc The only way I see is transferring quotes into triple-quotes, in case py-fill-string takes action. Nope, my example meant what I wrote. I don't want the newlines that triple quoted strings would bring with it. I want to split up a longer than 80 (or what have you) string into multiple lines. cheers, -matt Hmm, if you change my_string = foo bar baz ... junk stuff etc into: my_string = foo bar baz ... junk stuff etc then stuff etc will not be assigned to my_string any more. Are you prepared to give it up? If not, please deliver an example with a working final state... Cheers, Andreas ___ Python-mode mailing list Python-mode@python.org http://mail.python.org/mailman/listinfo/python-mode
Re: [Python-mode] code/macros to reformat code
On Wed, May 11, 2011 at 12:20 AM, Andreas Röhler andreas.roeh...@online.de wrote: Am 11.05.2011 00:44, schrieb m h: Folks- I was wondering if anyone has some code floating around to reformat code after the code passes a certain column (say 79 or 80). What I'm looking for is reformatting long lines. I'd like to convert something like (assume the k of junk is around 78): my_string = foo bar baz ... junk stuff etc to: my_string = foo bar baz ... junk stuff etc Hi, assume your result must read: my_string = foo bar baz ... junk stuff etc The only way I see is transferring quotes into triple-quotes, in case py-fill-string takes action. Nope, my example meant what I wrote. I don't want the newlines that triple quoted strings would bring with it. I want to split up a longer than 80 (or what have you) string into multiple lines. cheers, -matt ___ Python-mode mailing list Python-mode@python.org http://mail.python.org/mailman/listinfo/python-mode
[Python-mode] code/macros to reformat code
Folks- I was wondering if anyone has some code floating around to reformat code after the code passes a certain column (say 79 or 80). What I'm looking for is reformatting long lines. I'd like to convert something like (assume the k of junk is around 78): my_string = foo bar baz ... junk stuff etc to: my_string = foo bar baz ... junk stuff etc My searches have turned up nothing, but I'm assuming someone has something. cheers, -matt ___ Python-mode mailing list Python-mode@python.org http://mail.python.org/mailman/listinfo/python-mode