I was reading some old blog posts and I came across Wil Shipleys blog,
where he says to not manually wrap your comments and to let your
editor do it for you. Now, I keep word wrap off in my editor because
reading word-wrapped source is really hard, but I wouldn't mind it at
all in a comment block. Has anyone ever seen an editor that can handle
word wrap on a per (logical) line basis? I know scintilla can't do it,
and I've never seen one that could.
Chris Mellon wrote:
I was reading some old blog posts and I came across Wil Shipleys blog,
where he says to not manually wrap your comments and to let your
editor do it for you. Now, I keep word wrap off in my editor because
reading word-wrapped source is really hard,
I suppose if you followed the often suggested rule of no long lines in code, this wouldn't be an issue
but I wouldn't mind it at
all in a comment block. Has anyone ever seen an editor that can handle
word wrap on a per (logical) line basis?
I haven't, and, in fact, some broadly used editors (cough*emacs*cough) don't do soft wrap well at all, so I'd be disinclined to not wrap comments.
A good editor should be able to hard wrap comments well for you though.
-CHB
···
--
Christopher Barker, Ph.D.
Oceanographer
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker@noaa.gov
Chris Mellon wrote:
> I was reading some old blog posts and I came across Wil Shipleys blog,
> where he says to not manually wrap your comments and to let your
> editor do it for you. Now, I keep word wrap off in my editor because
> reading word-wrapped source is really hard,I suppose if you followed the often suggested rule of no long lines in
code, this wouldn't be an issue
I do, and it's not, but lines which end up long (other peoples code,
and sometimes I write
longer than other times, and sometimes I make my window small for some
other reason, etc, etc) are hard to read (and visually confusing) with
standard word wrap on. I suppose one could imagine a super-smart
context sensitive word-wrap algorithm which wrapped "correctly" for
code, ie, the way I would have indented it if I were manually wrapping
it.
But such a thing would also be capable of word-wrapping comments,
which is a case I find compelling
> but I wouldn't mind it at
> all in a comment block. Has anyone ever seen an editor that can handle
> word wrap on a per (logical) line basis?I haven't, and, in fact, some broadly used editors (cough*emacs*cough)
don't do soft wrap well at all, so I'd be disinclined to not wrap comments.A good editor should be able to hard wrap comments well for you though.
I view hard wrap as a crime against nature, so that solution is out for me.
···
On 10/11/07, Christopher Barker <Chris.Barker@noaa.gov> wrote:
Chris,
···
-----Original Message-----
From: Chris Mellon [mailto:arkanes@gmail.com]
Sent: Thursday, October 11, 2007 5:21 PM
To: wxPython-users@lists.wxwidgets.org
Subject: Re: [wxPython-users] Editor with per-line word wrap?On 10/11/07, Christopher Barker <Chris.Barker@noaa.gov> wrote:
> Chris Mellon wrote:
> > I was reading some old blog posts and I came across Wil Shipleys
> > blog, where he says to not manually wrap your comments and to let
> > your editor do it for you. Now, I keep word wrap off in my editor
> > because reading word-wrapped source is really hard,
>
> I suppose if you followed the often suggested rule of no
long lines in
> code, this wouldn't be an issue
>I do, and it's not, but lines which end up long (other
peoples code, and sometimes I write longer than other times,
and sometimes I make my window small for some other reason,
etc, etc) are hard to read (and visually confusing) with
standard word wrap on. I suppose one could imagine a
super-smart context sensitive word-wrap algorithm which
wrapped "correctly" for code, ie, the way I would have
indented it if I were manually wrapping it.But such a thing would also be capable of word-wrapping
comments, which is a case I find compelling>
> > but I wouldn't mind it at
> > all in a comment block. Has anyone ever seen an editor that can
> > handle word wrap on a per (logical) line basis?
>
> I haven't, and, in fact, some broadly used editors
(cough*emacs*cough)
> don't do soft wrap well at all, so I'd be disinclined to
not wrap comments.
>
> A good editor should be able to hard wrap comments well for
you though.
>I view hard wrap as a crime against nature, so that solution
is out for me.
I'm not sure what you mean by hard-wrapping, but Notepad++ seems to do
wrapping alright. If you have a really long line of text, it wraps it but
you'll notice that it doesn't increment the line number.
I don't use it for coding, but I use it for parsing crummy KixStart and
VBA code as well as developing my own *.reg files.
Mike
Chris,
> From: Chris Mellon [mailto:arkanes@gmail.com]
> Sent: Thursday, October 11, 2007 5:21 PM
> To: wxPython-users@lists.wxwidgets.org
> Subject: Re: [wxPython-users] Editor with per-line word wrap?
>
> > Chris Mellon wrote:
> > > I was reading some old blog posts and I came across Wil Shipleys
> > > blog, where he says to not manually wrap your comments and to let
> > > your editor do it for you. Now, I keep word wrap off in my editor
> > > because reading word-wrapped source is really hard,
> >
> > I suppose if you followed the often suggested rule of no
> long lines in
> > code, this wouldn't be an issue
> >
>
> I do, and it's not, but lines which end up long (other
> peoples code, and sometimes I write longer than other times,
> and sometimes I make my window small for some other reason,
> etc, etc) are hard to read (and visually confusing) with
> standard word wrap on. I suppose one could imagine a
> super-smart context sensitive word-wrap algorithm which
> wrapped "correctly" for code, ie, the way I would have
> indented it if I were manually wrapping it.
>
> But such a thing would also be capable of word-wrapping
> comments, which is a case I find compelling
>
> >
> > > but I wouldn't mind it at
> > > all in a comment block. Has anyone ever seen an editor that can
> > > handle word wrap on a per (logical) line basis?
> >
> > I haven't, and, in fact, some broadly used editors
> (cough*emacs*cough)
> > don't do soft wrap well at all, so I'd be disinclined to
> not wrap comments.
> >
> > A good editor should be able to hard wrap comments well for
> you though.
> >
>
> I view hard wrap as a crime against nature, so that solution
> is out for me.
>I'm not sure what you mean by hard-wrapping, but Notepad++ seems to do
wrapping alright. If you have a really long line of text, it wraps it but
you'll notice that it doesn't increment the line number.
Hard-wrap is where an actual newline is inserted into your document
where it needs to be wrapped. Soft (or virtual)-wrap is where the
wrapping is visual only. non-wrapping is where text isn't wrapped and
a horizontal scroll bar appears.
In most cases, an editor window can only be one of these "modes" at a
time. I'm interested in an editor where the line-wrap policy can be
determined on an individual basis, so that lines of code can be
wrapped differently than comments.
I've been thinking about this and I can't see any real technical
reason why it wouldn't work (line wrap calculations are done per-line
anyway), I just don't think anyone has ever implemented it that way.
I don't use it for coding, but I use it for parsing crummy KixStart and
VBA code as well as developing my own *.reg files.
I use SciTe for this same purpose.
···
On 10/12/07, Mike Driscoll <mdriscoll@co.marshall.ia.us> wrote:
> -----Original Message-----
> On 10/11/07, Christopher Barker <Chris.Barker@noaa.gov> wrote:
Chris Mellon wrote:
Hard-wrap is where an actual newline is inserted into your document
where it needs to be wrapped. Soft (or virtual)-wrap is where the
wrapping is visual only. non-wrapping is where text isn't wrapped and
a horizontal scroll bar appears.In most cases, an editor window can only be one of these "modes" at a
time. I'm interested in an editor where the line-wrap policy can be
determined on an individual basis, so that lines of code can be
wrapped differently than comments.
Are you reading, Rob and Dusty? That would be cool.
-Chris
···
--
Christopher Barker, Ph.D.
Oceanographer
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker@noaa.gov
Maybe combining hard-wrapping and soft/no-wrapping can be implemented
with the current wxSTC, but for sure non-wrapping and soft-wrapping
can't. I guess you have more chance to get this to work on the scintilla
mailing list.
Stani
Christopher Barker schreef:
···
Chris Mellon wrote:
Hard-wrap is where an actual newline is inserted into your document
where it needs to be wrapped. Soft (or virtual)-wrap is where the
wrapping is visual only. non-wrapping is where text isn't wrapped and
a horizontal scroll bar appears.In most cases, an editor window can only be one of these "modes" at a
time. I'm interested in an editor where the line-wrap policy can be
determined on an individual basis, so that lines of code can be
wrapped differently than comments.Are you reading, Rob and Dusty?
That would be cool.
-Chris