Loading ...
Sorry, an error occurred while loading the content.

scrolling long lines

Expand Messages
  • Paul Tremblay
    I ve asked this question before, but I need to see if I can get an answer before I give up on vim for my needs. I have long lines of text, which I treat as
    Message 1 of 16 , Nov 2, 2001
    • 0 Attachment
      I've asked this question before, but I need to see if I can get
      an answer before I give up on vim for my needs.

      I have long lines of text, which I treat as paragraphs. The
      problem is, that it is very difficult to scroll these lines.

      Imagine that one "paragraph" (really a long line of text) runs
      longer than the screen. If I try to scroll in gvim, then gvim
      scrolls to the end of the line. That means it might scroll 100
      or 200 words down. The text in the middle of the screen
      disappears. The only way for me to scroll down a bit at a time
      is by typing "j".

      Is there a way to scroll down a bit at a time? How can I tell
      vim to scroll down a "screen line" and not a real line?

      Thanks

      Paul

      --
      ************************
      *Paul Tremblay *
      *phthenry@...*
      ************************
    • Alper Ersoy
      ... Hi Paul, You can move the cursor thru screen lines with gj and gk commands in normal mode. For further information about these commands please check :help
      Message 2 of 16 , Nov 2, 2001
      • 0 Attachment
        On Fri, Nov 02, 2001 at 11:17:34PM -0500, Paul Tremblay wrote:
        > I've asked this question before, but I need to see if I can get
        > an answer before I give up on vim for my needs.
        >
        > I have long lines of text, which I treat as paragraphs. The
        > problem is, that it is very difficult to scroll these lines.
        >
        > Imagine that one "paragraph" (really a long line of text) runs
        > longer than the screen. If I try to scroll in gvim, then gvim
        > scrolls to the end of the line. That means it might scroll 100
        > or 200 words down. The text in the middle of the screen
        > disappears. The only way for me to scroll down a bit at a time
        > is by typing "j".
        >
        > Is there a way to scroll down a bit at a time? How can I tell
        > vim to scroll down a "screen line" and not a real line?
        >
        > Thanks
        >
        > Paul
        >

        Hi Paul,

        You can move the cursor thru screen lines with gj and gk commands in
        normal mode.

        For further information about these commands please check
        ":help up-down-motions" out.

        You may also like setting 'nowrap' and adding the b letter to the
        'guioptions'.

        I hope these help.

        --
        Alper Ersoy
      • Paul Tremblay
        ... Yes. In fact, I had set this in my .vimrc: nmap j=gj nmap k=gk But that completely limits my ability to scroll to scrolling one line at a time. Vim, and
        Message 3 of 16 , Nov 3, 2001
        • 0 Attachment
          On Sat, Nov 03, 2001 at 06:41:29AM +0200, Alper Ersoy wrote:

          > You can move the cursor thru screen lines with gj and gk commands in
          > normal mode.

          Yes. In fact, I had set this in my .vimrc:

          nmap j=gj
          nmap k=gk

          But that completely limits my ability to scroll to scrolling one
          line at a time. Vim, and gvim cannot distinguish between
          screen lines and real lines.

          I've included a section from a novel (*Remembrance of Things
          Past*) to show you what I mean. Open this section in gvim, and
          try scrolling a bit with the horizontal scroll bar. There is no
          way to move the screen down just a little bit; the last
          paragraph completely jumps off the screen.

          In fact, using the commands ctr d, or ctr f, also have the same
          affect; they make the screen text jump to the end of the
          document. I found the same behavior when I used c-e.

          > You may also like setting 'nowrap' and adding the b letter to the
          > 'guioptions'.

          If I did this, I would have one or two lines of very, very long
          lines, and I couldn't edit them.

          Thanks

          Paul

          >
          > On Fri, Nov 02, 2001 at 11:17:34PM -0500, Paul Tremblay wrote:
          > > I've asked this question before, but I need to see if I can get
          > > an answer before I give up on vim for my needs.
          > >
          > > I have long lines of text, which I treat as paragraphs. The
          > > problem is, that it is very difficult to scroll these lines.
          > >
          > > Imagine that one "paragraph" (really a long line of text) runs
          > > longer than the screen. If I try to scroll in gvim, then gvim
          > > scrolls to the end of the line. That means it might scroll 100
          > > or 200 words down. The text in the middle of the screen
          > > disappears. The only way for me to scroll down a bit at a time
          > > is by typing "j".
          > >
          > > Is there a way to scroll down a bit at a time? How can I tell
          > > vim to scroll down a "screen line" and not a real line?
          > >
          > > Thanks
          > >
          > > Paul
          > >
          >
          > Hi Paul,
          >

          >
          > For further information about these commands please check
          > ":help up-down-motions" out.
          >
          > You may also like setting 'nowrap' and adding the b letter to the
          > 'guioptions'.
          >
          > I hope these help.
          >
          > --
          > Alper Ersoy

          --
          ************************
          *Paul Tremblay *
          *phthenry@...*
          ************************
        • Paul Tremblay
          WOOPS! Forgot to include the file in my last email. I included it in this email. ... Yes. In fact, I had set this in my .vimrc: nmap j=gj nmap k=gk But that
          Message 4 of 16 , Nov 3, 2001
          • 0 Attachment
            WOOPS! Forgot to include the file in my last email. I included
            it in this email.

            On Sat, Nov 03, 2001 at 06:41:29AM +0200, Alper Ersoy wrote:

            > You can move the cursor thru screen lines with gj and gk commands in
            > normal mode.

            Yes. In fact, I had set this in my .vimrc:

            nmap j=gj
            nmap k=gk

            But that completely limits my ability to scroll to scrolling one
            line at a time. Vim, and gvim cannot distinguish between
            screen lines and real lines.

            I've included a section from a novel (*Remembrance of Things
            Past*) to show you what I mean. Open this section in gvim, and
            try scrolling a bit with the horizontal scroll bar. There is no
            way to move the screen down just a little bit; the last
            paragraph completely jumps off the screen.

            In fact, using the commands ctr d, or ctr f, also have the same
            affect; they make the screen text jump to the end of the
            document. I found the same behavior when I used c-e.

            > You may also like setting 'nowrap' and adding the b letter to the
            > 'guioptions'.

            If I did this, I would have one or two lines of very, very long
            lines, and I couldn't edit them.

            Thanks

            Paul

            >
            > On Fri, Nov 02, 2001 at 11:17:34PM -0500, Paul Tremblay wrote:
            > > I've asked this question before, but I need to see if I can get
            > > an answer before I give up on vim for my needs.
            > >
            > > I have long lines of text, which I treat as paragraphs. The
            > > problem is, that it is very difficult to scroll these lines.
            > >
            > > Imagine that one "paragraph" (really a long line of text) runs
            > > longer than the screen. If I try to scroll in gvim, then gvim
            > > scrolls to the end of the line. That means it might scroll 100
            > > or 200 words down. The text in the middle of the screen
            > > disappears. The only way for me to scroll down a bit at a time
            > > is by typing "j".
            > >
            > > Is there a way to scroll down a bit at a time? How can I tell
            > > vim to scroll down a "screen line" and not a real line?
            > >
            > > Thanks
            > >
            > > Paul
            > >
            >
            > Hi Paul,
            >

            >
            > For further information about these commands please check
            > ":help up-down-motions" out.
            >
            > You may also like setting 'nowrap' and adding the b letter to the
            > 'guioptions'.
            >
            > I hope these help.
            >
            > --
            > Alper Ersoy

            --
            ************************
            *Paul Tremblay *
            *phthenry@...*
            ************************
          • Alan G. Isaac
            ... You mean you told it not to! You have to decide what you want: it you want two contradictory things, obviously you cannot have them both at the same time.
            Message 5 of 16 , Nov 3, 2001
            • 0 Attachment
              On Sat, 3 Nov 2001, Paul Tremblay wrote:
              > Yes. In fact, I had set this in my .vimrc:
              > nmap j=gj
              > nmap k=gk
              > But that completely limits my ability to scroll to scrolling one
              > line at a time. Vim, and gvim cannot distinguish between
              > screen lines and real lines.

              You mean you told it not to! You have to decide what you want:
              it you want two contradictory things, obviously you cannot have
              them both at the same time.

              Perhaps you would like to leave j and k untouched
              (strongly recommended) and either get in the habit of gj and gk
              when needed or use
              nmap <down> gj
              nmap <up> gk

              Alan Isaac
            • Paul Tremblay
              ... I want gvim to scroll on screen line at a time. It doesn t matter if I map this key sequence or not. Let me state again: I have very long lines of text
              Message 6 of 16 , Nov 3, 2001
              • 0 Attachment
                On Sat, Nov 03, 2001 at 01:56:50PM -0500, Alan G. Isaac wrote:

                >
                > You mean you told it not to! You have to decide what you want:
                > it you want two contradictory things, obviously you cannot have
                > them both at the same time.
                >

                I want gvim to scroll on screen line at a time. It doesn't
                matter if I map this key sequence or not.

                Let me state again: I have very long lines of text in gvim. If
                I try to scroll down a little in gvim, using the vertical
                scroll bar, then the text jumps ahead 100 or 200 words,
                depending on the length of the line. Gvim thinks I want to go
                to the beginning of the next real line, instead of scroll down a
                screen line.

                I think if you open up the document I included and try to do
                what exactly I have said, you will see what I mean. Hit the
                little down arrow in whatever winddow manager you are in. As
                you can see, the text goes down a little bit on the shorter
                paragraph. But on the last, long paragraph, it completely skips
                it.

                If I open the same document in nedit (another text editor), I
                have no problem scrolling down a screen line at a time. But
                gvim (and vim, too) is really intent on getting you to the next
                real line; it won't let you scroll to the middle.



                > Perhaps you would like to leave j and k untouched
                > (strongly recommended) and either get in the habit of gj and gk
                > when needed or use
                > nmap <down> gj
                > nmap <up> gk
                >


                I mapped this and still have the same problem.

                Paul

                --
                ************************
                *Paul Tremblay *
                *phthenry@...*
                ************************
              • Alper Ersoy
                ... Paul, I can perfectly scroll up and down by screen lines (e.g. without going thru the EOLs) by gj and gk. Have you tried them without mapping them
                Message 7 of 16 , Nov 3, 2001
                • 0 Attachment
                  On Sat, Nov 03, 2001 at 03:49:15PM -0500, Paul Tremblay wrote:
                  > I want gvim to scroll on screen line at a time. It doesn't
                  > matter if I map this key sequence or not.
                  >
                  > Let me state again: I have very long lines of text in gvim. If
                  > I try to scroll down a little in gvim, using the vertical
                  > scroll bar, then the text jumps ahead 100 or 200 words,
                  > depending on the length of the line. Gvim thinks I want to go
                  > to the beginning of the next real line, instead of scroll down a
                  > screen line.
                  >
                  > I think if you open up the document I included and try to do
                  > what exactly I have said, you will see what I mean. Hit the
                  > little down arrow in whatever winddow manager you are in. As
                  > you can see, the text goes down a little bit on the shorter
                  > paragraph. But on the last, long paragraph, it completely skips
                  > it.
                  >
                  > If I open the same document in nedit (another text editor), I
                  > have no problem scrolling down a screen line at a time. But
                  > gvim (and vim, too) is really intent on getting you to the next
                  > real line; it won't let you scroll to the middle.
                  >

                  Paul,

                  I can perfectly scroll up and down by screen lines (e.g. without going
                  thru the EOLs) by gj and gk. Have you tried them without mapping them
                  first? Please type gj and gk in the normal mode and you'll see that you
                  can actually scroll by screen lines.

                  Regards,

                  --
                  Alper Ersoy
                • Piet Delport
                  ... I think the problem here is that Vim was designed around the concept of `real lines, not screen lines. Things like the wrap setting and gj/gk/g0/g$
                  Message 8 of 16 , Nov 3, 2001
                  • 0 Attachment
                    On Sat, 03 Nov 2001 at 15:49:15 -0500, Paul Tremblay wrote:
                    > On Sat, Nov 03, 2001 at 01:56:50PM -0500, Alan G. Isaac wrote:
                    >>
                    >> You mean you told it not to! You have to decide what you want:
                    >> it you want two contradictory things, obviously you cannot have them
                    >> both at the same time.
                    >
                    > I want gvim to scroll on screen line at a time. It doesn't matter if
                    > I map this key sequence or not.
                    >
                    > Let me state again: I have very long lines of text in gvim. If I try
                    > to scroll down a little in gvim, using the vertical scroll bar, then
                    > the text jumps ahead 100 or 200 words, depending on the length of the
                    > line. Gvim thinks I want to go to the beginning of the next real
                    > line, instead of scroll down a screen line.
                    >
                    > I think if you open up the document I included and try to do what
                    > exactly I have said, you will see what I mean. Hit the little down
                    > arrow in whatever winddow manager you are in. As you can see, the
                    > text goes down a little bit on the shorter paragraph. But on the last,
                    > long paragraph, it completely skips it.
                    >
                    > If I open the same document in nedit (another text editor), I have no
                    > problem scrolling down a screen line at a time. But gvim (and vim,
                    > too) is really intent on getting you to the next real line; it won't
                    > let you scroll to the middle.
                    >
                    >> Perhaps you would like to leave j and k untouched (strongly
                    >> recommended) and either get in the habit of gj and gk when needed or
                    >> use
                    >> nmap <down> gj
                    >> nmap <up> gk
                    >
                    > I mapped this and still have the same problem.

                    I think the problem here is that Vim was designed around the concept of
                    `real' lines, not screen lines. Things like the 'wrap' setting and
                    gj/gk/g0/g$ exist, but at the core, vim still handles its addressing and
                    commands in terms of file lines.

                    One example of this is that the current window always starts on a real
                    line, regardless of how many extra screen lines that line takes up. The
                    GUI scrollbar works accordingly... one `tick' down equals one file line
                    down. I'm not sure how much trouble it will be to change the scrollbar
                    so that it works in terms of screen lines instead of file lines, but i'm
                    betting it's not trivial.

                    At risk of being accused of bending the problem to fit the tool, can i
                    ask why you want to go along this route, instead of the usual approach
                    of keeping paragraphs on multiple lines, separated by blank lines? Vim,
                    along with a lot of (if not most) other text processing tools, simply
                    work better and easier with this kind of text.

                    --
                    Piet Delport <siberiyan@...>
                    Today's subliminal thought is:
                  • Brian Medley
                    ... I believe the original poster was talking about grabbing the schollbar and moving it up and down with the mouse. I may be mistaken, though.. --
                    Message 9 of 16 , Nov 3, 2001
                    • 0 Attachment
                      On Sun, Nov 04, 2001 at 12:41:51AM +0200, Alper Ersoy wrote:

                      > I can perfectly scroll up and down by screen lines (e.g. without going
                      > thru the EOLs) by gj and gk. Have you tried them without mapping them
                      > first? Please type gj and gk in the normal mode and you'll see that you
                      > can actually scroll by screen lines.

                      I believe the original poster was talking about grabbing the schollbar and
                      moving it up and down with the mouse. I may be mistaken, though..

                      --
                      ~'`^`'~=-.,__,.-=~'`^`'~=-.,__,.-=~'`^`'~=-., \|/ (___) \|/ _,.-=~'`^`
                      Brian Medley @~./'O o`\.~@
                      "Knowledge is Power" brian.medley@... /__( \___/ )__\ *PPPFFBT!*
                      -- Francis Bacon `\__`U_/'
                      _,.-=~'`^`'~=-.,__,.-=~'`^`'~=-.,__,.-=~'`^`'~= <____|' ^^`'~=-.,__,.-=
                      ~`'^`'~=-.,__,.-=~'`^`'~=-.,__,.-=~'`^`'~=-.,__,.-==--^'~=-.,__,.-=~'`^`
                    • Benji Fisher
                      ... I thought so, too, at first. After some thought, I think I understand the question, and I do not know a solution. There is a difference between scrolling
                      Message 10 of 16 , Nov 3, 2001
                      • 0 Attachment
                        Brian Medley wrote:
                        >
                        > On Sun, Nov 04, 2001 at 12:41:51AM +0200, Alper Ersoy wrote:
                        >
                        > > I can perfectly scroll up and down by screen lines (e.g. without going
                        > > thru the EOLs) by gj and gk. Have you tried them without mapping them
                        > > first? Please type gj and gk in the normal mode and you'll see that you
                        > > can actually scroll by screen lines.
                        >
                        > I believe the original poster was talking about grabbing the schollbar and
                        > moving it up and down with the mouse. I may be mistaken, though..

                        I thought so, too, at first. After some thought, I think I understand
                        the question, and I do not know a solution.

                        There is a difference between scrolling and moving the cursor. I have
                        seen several suggestions to use gj and gk, which will move the cursor one
                        screen line. This does not solve the problem of scrolling the screen by one
                        screen line, which seems to be impossible.

                        --Benji Fisher
                      • Paul Tremblay
                        ... Yes, you have addressed my problem correctly. I kind of guessed there was no way to get around this (at least with the way vim is now written). ... I
                        Message 11 of 16 , Nov 3, 2001
                        • 0 Attachment
                          On Sun, Nov 04, 2001 at 01:04:17AM +0200, Piet Delport wrote:

                          > I think the problem here is that Vim was designed around the concept of
                          > `real' lines, not screen lines. Things like the 'wrap' setting and
                          > gj/gk/g0/g$ exist, but at the core, vim still handles its addressing and
                          > commands in terms of file lines.
                          >
                          > One example of this is that the current window always starts on a real
                          > line, regardless of how many extra screen lines that line takes up. The
                          > GUI scrollbar works accordingly... one `tick' down equals one file line
                          > down. I'm not sure how much trouble it will be to change the scrollbar
                          > so that it works in terms of screen lines instead of file lines, but i'm
                          > betting it's not trivial.

                          Yes, you have addressed my problem correctly. I kind of guessed
                          there was no way to get around this (at least with the way vim
                          is now written).

                          >
                          > At risk of being accused of bending the problem to fit the tool, can i
                          > ask why you want to go along this route, instead of the usual approach
                          > of keeping paragraphs on multiple lines, separated by blank lines? Vim,
                          > along with a lot of (if not most) other text processing tools, simply
                          > work better and easier with this kind of text.
                          >


                          I write mostly fiction, and keeping a blank lines seems a bit
                          strange. In fiction, a blank space usually means a lot of time
                          has passed.

                          However, even if I did put a blank line between paragraphs,
                          I would still have the same problem. Let's say I write a fairly
                          long paragraph. I am editing it, and I simply want to go down a
                          few lines. I grab the scroll bar, and woosh! the whole
                          paragraph disappears, as the scrollbar goes to the beginning of
                          the next real line.

                          My problem results because I choose to use wrap rather than break
                          my lines.

                          Of course, I could break the lines by using the right options.
                          But then, every time I wanted to insert a few words in the
                          middle of a paragraph, I would have to reformat the paragraph.
                          (If I didn't, the lines would become broken up, and this makes
                          them really too difficult to read and edit.)

                          It is too bad that vim can't scroll the way Nedit can. Vim is so
                          damn powerful. When I started to learn some its features, like
                          abbreviations and auto completion (just to name a few), I thought
                          "Wow!"

                          On a side note, I've noticed the really good text editors are
                          focused around programmers. This makes sense, considering many
                          linux users are in development at some level.

                          On the other hand, many linux gurus say "Don't use a word
                          processor! The encourage bad habits! They use propriety
                          formats." Yet if a text editor is really short on features
                          writers need, they will have no choice but to use Kword, or Star
                          Office. Which is too bad, because the speed and flexibility of a
                          text editor can't be beat.

                          Maybe in the future text editors will pack in features that
                          writers could use.

                          But thanks for all your help!

                          Paul

                          --
                          ************************
                          *Paul Tremblay *
                          *phthenry@...*
                          ************************
                        • Merlin Hansen
                          Just a comment or two... After following this thread and reading this last message I now have a clear understanding of the problem and, more importantly, the
                          Message 12 of 16 , Nov 3, 2001
                          • 0 Attachment
                            Just a comment or two...

                            After following this thread and reading this last message I now have a clear
                            understanding of the problem and, more importantly, the justified reasons for
                            using the 'editing style' (if you like) that Paul is using.

                            Having said that I find that this is a rare and interesting thread indeed as
                            it gives insight into the ways that Vim is used in a non programming
                            environment. Admitedly I use Vim almost exclusively for software development
                            or very simple text documents (notes, journal entries, sig editing, etc.).
                            Being firmly set in my paradym I have not considered the benefits of using Vim
                            for larger non programming related tasks and therefore have not promoted for
                            such.

                            My point is that not only should the solution of Paul's problem (screen line
                            scrolling) be considered for the Vim todo/wish list but also more feedback
                            regarding missing or constrained features related to non programming tasks
                            should be solicited from persons such as Paul for future consideration. This
                            strategy would not only improve Vim for use developer types but would advance
                            Vim towards it goal of being a truly great universal text editor.

                            Paul: Take this as a hint please to expand further on any features you may
                            question or would like to see implemented.

                            That's my two cents... ok maybe a nickels worth.

                            Merlin.

                            Paul Tremblay wrote:
                            >
                            > On Sun, Nov 04, 2001 at 01:04:17AM +0200, Piet Delport wrote:
                            >
                            > > I think the problem here is that Vim was designed around the concept of
                            > > `real' lines, not screen lines. Things like the 'wrap' setting and
                            > > gj/gk/g0/g$ exist, but at the core, vim still handles its addressing and
                            > > commands in terms of file lines.
                            > >
                            > > One example of this is that the current window always starts on a real
                            > > line, regardless of how many extra screen lines that line takes up. The
                            > > GUI scrollbar works accordingly... one `tick' down equals one file line
                            > > down. I'm not sure how much trouble it will be to change the scrollbar
                            > > so that it works in terms of screen lines instead of file lines, but i'm
                            > > betting it's not trivial.
                            >
                            > Yes, you have addressed my problem correctly. I kind of guessed
                            > there was no way to get around this (at least with the way vim
                            > is now written).
                            >
                            > >
                            > > At risk of being accused of bending the problem to fit the tool, can i
                            > > ask why you want to go along this route, instead of the usual approach
                            > > of keeping paragraphs on multiple lines, separated by blank lines? Vim,
                            > > along with a lot of (if not most) other text processing tools, simply
                            > > work better and easier with this kind of text.
                            > >
                            >
                            > I write mostly fiction, and keeping a blank lines seems a bit
                            > strange. In fiction, a blank space usually means a lot of time
                            > has passed.
                            >
                            > However, even if I did put a blank line between paragraphs,
                            > I would still have the same problem. Let's say I write a fairly
                            > long paragraph. I am editing it, and I simply want to go down a
                            > few lines. I grab the scroll bar, and woosh! the whole
                            > paragraph disappears, as the scrollbar goes to the beginning of
                            > the next real line.
                            >
                            > My problem results because I choose to use wrap rather than break
                            > my lines.
                            >
                            > Of course, I could break the lines by using the right options.
                            > But then, every time I wanted to insert a few words in the
                            > middle of a paragraph, I would have to reformat the paragraph.
                            > (If I didn't, the lines would become broken up, and this makes
                            > them really too difficult to read and edit.)
                            >
                            > It is too bad that vim can't scroll the way Nedit can. Vim is so
                            > damn powerful. When I started to learn some its features, like
                            > abbreviations and auto completion (just to name a few), I thought
                            > "Wow!"
                            >
                            > On a side note, I've noticed the really good text editors are
                            > focused around programmers. This makes sense, considering many
                            > linux users are in development at some level.
                            >
                            > On the other hand, many linux gurus say "Don't use a word
                            > processor! The encourage bad habits! They use propriety
                            > formats." Yet if a text editor is really short on features
                            > writers need, they will have no choice but to use Kword, or Star
                            > Office. Which is too bad, because the speed and flexibility of a
                            > text editor can't be beat.
                            >
                            > Maybe in the future text editors will pack in features that
                            > writers could use.
                            >
                            > But thanks for all your help!
                            >
                            > Paul
                            >
                            > --
                            > ************************
                            > *Paul Tremblay *
                            > *phthenry@...*
                            > ************************
                          • Piet Delport
                            ... [...GUI toolbar not working with screen lines...] ... In the printed form, yes, but for electronic fiction i m actually more accustomed to spaced
                            Message 13 of 16 , Nov 4, 2001
                            • 0 Attachment
                              On Sun, 04 Nov 2001 at 00:50:33 -0500, Paul Tremblay wrote:
                              > On Sun, Nov 04, 2001 at 01:04:17AM +0200, Piet Delport wrote:
                              >>
                              [...GUI toolbar not working with screen lines...]
                              >>
                              >> At risk of being accused of bending the problem to fit the tool, can
                              >> i ask why you want to go along this route, instead of the usual
                              >> approach of keeping paragraphs on multiple lines, separated by blank
                              >> lines? Vim, along with a lot of (if not most) other text processing
                              >> tools, simply work better and easier with this kind of text.
                              >
                              > I write mostly fiction, and keeping a blank lines seems a bit strange.
                              > In fiction, a blank space usually means a lot of time has passed.

                              In the printed form, yes, but for electronic fiction i'm actually more
                              accustomed to spaced paragraphs, with context switches indicated by
                              longer breaks and/or centered "***" delimiters, and such. Might just be
                              me, though.

                              > However, even if I did put a blank line between paragraphs, I would
                              > still have the same problem. Let's say I write a fairly long
                              > paragraph. I am editing it, and I simply want to go down a few lines.
                              > I grab the scroll bar, and woosh! the whole paragraph disappears, as
                              > the scrollbar goes to the beginning of the next real line.
                              >
                              > My problem results because I choose to use wrap rather than break my
                              > lines.
                              >
                              > Of course, I could break the lines by using the right options. But
                              > then, every time I wanted to insert a few words in the middle of a
                              > paragraph, I would have to reformat the paragraph. (If I didn't, the
                              > lines would become broken up, and this makes them really too difficult
                              > to read and edit.)

                              Indeed, which is why Vim includes a powerful reformatter:

                              :h formatting

                              and especially

                              :h gq

                              So when you're done re-arranging your paragraph, just put your cursor on
                              it and type "gqap" ("reformat a paragraph"). Viola, it's 'textwidth'
                              columns wide. :-) And it will stay that way even in dumb
                              editors/viewers such as `cat' and `more', instead of being dependant on
                              an intelligent viewer/editor that cat do line wrapping at word
                              boundaries.

                              "Really" wrapped text also works better with tools like grep, for
                              example. When you grep for something on non-wrapped text (such as what
                              you currently use), you'll always get entire paragraphs listed as
                              matches, instead of the single lines you'd expect.

                              (Another thing i should add is that if you're quite serious about the
                              appearance and formatting of your work, you might want to look beyond
                              plain text anyway. There are many markup languages, like LaTeX, and
                              SGML/XML-derivatives such as DocBook, that keep your content independent
                              of the final layout and formatting. You can write your `source' once,
                              much in the way you do now, and then render that to HTML, Postscript
                              (for book-quality printing), or many others i probably haven't heard of,
                              all at the press of a metaphorical button. Plain text being one of
                              them, of course.)

                              > It is too bad that vim can't scroll the way Nedit can. Vim is so damn
                              > powerful. When I started to learn some its features, like
                              > abbreviations and auto completion (just to name a few), I thought
                              > "Wow!"
                              >
                              > On a side note, I've noticed the really good text editors are focused
                              > around programmers. This makes sense, considering many linux users
                              (s/linux/unix/, the rest of us are human too :-)
                              > are in development at some level.

                              This is true, but remember that Vim is called a "text editor" instead of
                              a "(source) code editor" or IDE for a very good reason: it's damn good
                              at performing manipulative magic on *any* kind text, of which source
                              code is merely a subset.

                              > On the other hand, many linux gurus say "Don't use a word processor!
                              > The encourage bad habits! They use propriety formats."

                              Those have their uses, especially for the kind of people who don't
                              really have the time or need to learn an editor like vim to write the
                              odd document. And they're not all proprietary, despite the efforts of
                              some of the corporate giants.

                              > Yet if a text editor is really short on features writers need, they
                              > will have no choice but to use Kword, or Star Office. Which is too
                              > bad, because the speed and flexibility of a text editor can't be beat.
                              >
                              > Maybe in the future text editors will pack in features that writers
                              > could use.

                              Oh, but they do; you just have to know where to look. :-)

                              > But thanks for all your help!

                              --
                              Piet Delport <siberiyan@...>
                              Today's subliminal thought is:
                            • Kalle Bjorklid
                              ... I did some exploration: if you have a single-line paragraph that does not fit in the window, you can use gj/gk to scroll one screen-line at a time,
                              Message 14 of 16 , Nov 4, 2001
                              • 0 Attachment
                                On Sun, 4 Nov 2001, Piet Delport wrote:

                                > I think the problem here is that Vim was designed around the concept of
                                > `real' lines, not screen lines. Things like the 'wrap' setting and
                                > gj/gk/g0/g$ exist, but at the core, vim still handles its addressing and
                                > commands in terms of file lines.
                                >
                                > One example of this is that the current window always starts on a real
                                > line, regardless of how many extra screen lines that line takes up. The
                                > GUI scrollbar works accordingly... one `tick' down equals one file line
                                > down. I'm not sure how much trouble it will be to change the scrollbar
                                > so that it works in terms of screen lines instead of file lines, but i'm
                                > betting it's not trivial.

                                I did some exploration: if you have a single-line paragraph that does not
                                fit in the window, you can use gj/gk to "scroll" one screen-line at a
                                time, which is interesting, since this can't be done (?) with shorter
                                one-line-paragraphs. So, implementing one screen line scrolling might not
                                be that non-trivial... Another observation is that you can't view the
                                whole text with the scrollbar, as it seems possible only to show the
                                beginning of the long won't-fit-in-the-window paragraph.

                                I also found a bug: if you 'set so=1000', and scroll down with gj on the
                                really long online paragraph, at some point the window goes completely
                                blank. Also, when scrolling down, the cursor leaves a trace (it looks
                                like having multiple cursors on top of each other. I'm using gvim 6.0 on
                                Win32.

                                --
                                "Kalle" Karl-Mikael Bjorklid
                                E-Mail: bjorklid@...
                                Work-related: kalle.bjorklid@...
                                WWW: www.cc.jyu.fi/~bjorklid/
                              • Benji Fisher
                                ... [snip] ... [snip] ... First of all, I second the suggestion that you edit with short lines and then use another tool (LaTeX is what I use.) to format it
                                Message 15 of 16 , Nov 4, 2001
                                • 0 Attachment
                                  Piet Delport wrote:

                                  > On Sun, 04 Nov 2001 at 00:50:33 -0500, Paul Tremblay wrote:
                                  >
                                  >>On Sun, Nov 04, 2001 at 01:04:17AM +0200, Piet Delport wrote:
                                  >>
                                  > [...GUI toolbar not working with screen lines...]
                                  >
                                  [snip]
                                  >>However, even if I did put a blank line between paragraphs, I would
                                  >>still have the same problem. Let's say I write a fairly long
                                  >>paragraph. I am editing it, and I simply want to go down a few lines.
                                  >>I grab the scroll bar, and woosh! the whole paragraph disappears, as
                                  >>the scrollbar goes to the beginning of the next real line.
                                  >>
                                  >>My problem results because I choose to use wrap rather than break my
                                  >>lines.
                                  >>
                                  >>Of course, I could break the lines by using the right options. But
                                  >>then, every time I wanted to insert a few words in the middle of a
                                  >>paragraph, I would have to reformat the paragraph. (If I didn't, the
                                  >>lines would become broken up, and this makes them really too difficult
                                  >>to read and edit.)
                                  [snip]
                                  > (Another thing i should add is that if you're quite serious about the
                                  > appearance and formatting of your work, you might want to look beyond
                                  > plain text anyway. There are many markup languages, like LaTeX, and
                                  > SGML/XML-derivatives such as DocBook, that keep your content independent
                                  > of the final layout and formatting. You can write your `source' once,
                                  > much in the way you do now, and then render that to HTML, Postscript
                                  > (for book-quality printing), or many others i probably haven't heard of,
                                  > all at the press of a metaphorical button. Plain text being one of
                                  > them, of course.)

                                  First of all, I second the suggestion that you edit with "short"
                                  lines and
                                  then use another tool (LaTeX is what I use.) to format it for actual
                                  reading.

                                  Second, if you want to stick with long lines, there is a simple
                                  suggestion using only vim. (Well, not that simple...) You can keep
                                  your file
                                  saved with long lines. When you start to edit it with vim, you can
                                  automatically :set tw=80 (or whatever) and reformat into paragraphs
                                  separated
                                  by empty lines. Then, before saving the file, vim can re-join all the
                                  lines in
                                  each paragraph, and remove the empty lines.

                                  This can all be done with a couple of autocommands. If you want
                                  to try
                                  this method, ask for help with the details.

                                  HTH
                                  --Benji Fisher
                                • Ed Grimm
                                  ... I m only accustomed to seeing this after I go in and fix the POC. Personally, in both printed and electronic, I really prefer a blank line for paragraph
                                  Message 16 of 16 , Nov 4, 2001
                                  • 0 Attachment
                                    On Sun, 4 Nov 2001, Piet Delport wrote:
                                    > On Sun, 04 Nov 2001 at 00:50:33 -0500, Paul Tremblay wrote:
                                    >> On Sun, Nov 04, 2001 at 01:04:17AM +0200, Piet Delport wrote:
                                    >>>
                                    > [...GUI toolbar not working with screen lines...]
                                    >>>
                                    >>> At risk of being accused of bending the problem to fit the tool, can
                                    >>> i ask why you want to go along this route, instead of the usual
                                    >>> approach of keeping paragraphs on multiple lines, separated by blank
                                    >>> lines? Vim, along with a lot of (if not most) other text processing
                                    >>> tools, simply work better and easier with this kind of text.
                                    >>
                                    >> I write mostly fiction, and keeping a blank lines seems a bit strange.
                                    >> In fiction, a blank space usually means a lot of time has passed.
                                    >
                                    > In the printed form, yes, but for electronic fiction i'm actually more
                                    > accustomed to spaced paragraphs, with context switches indicated by
                                    > longer breaks and/or centered "***" delimiters, and such. Might just be
                                    > me, though.

                                    I'm only accustomed to seeing this after I go in and fix the POC.

                                    Personally, in both printed and electronic, I really prefer a blank line
                                    for paragraph separator, with either a triple blank line or section
                                    break signifying much time. Normally, a section break is appropriate at
                                    such a point anyway. I have been known to check books for this before
                                    purchasing. Note that I realize I'm in the minority; I believe that the
                                    majority doesn't really care too much (this may be because the majority
                                    doesn't read that much, whereas the geekcode thinks I have a staple diet
                                    from time to time. I'm not sure why, staples aren't very edible.)

                                    >> Of course, I could break the lines by using the right options. But
                                    >> then, every time I wanted to insert a few words in the middle of a
                                    >> paragraph, I would have to reformat the paragraph. (If I didn't, the
                                    >> lines would become broken up, and this makes them really too difficult
                                    >> to read and edit.)
                                    >
                                    > Indeed, which is why Vim includes a powerful reformatter:

                                    Indeed. But, last I checked (5.8), it had issues with dual-indent
                                    levels. That is, it doesn't do them, even though it has an option to,
                                    unless smartindent is turned off (not documented; documentation merely
                                    says that autoindent must be on), nor does it recognize a change of
                                    indent as a paragraph separator (ever). Oh, and it also will only take
                                    the indent of the second line of a paragraph as the indent of the rest
                                    of the paragraph if that line has less indent than the first; greater
                                    will be ignored. Note that I've known about these for a long while, but
                                    didn't report them because it didn't really matter to me - I only found
                                    out due to playing around with it when I was going through that section
                                    in the helpfiles.

                                    My suggested fix for this would be to add another format option 'f';
                                    this format option would cause vim to not fix indentation, and if used
                                    with fo=2, it would cause vim to count as a paragraph only those lines
                                    which followed a two-level indentation style. So, if fo=2f, then

                                    This is a
                                    paragraph
                                    greatly in
                                    need
                                    of 'gq'.
                                    This is a paragraph which needs no help.
                                    This is another
                                    paragraph which must be fixed. It also happens to be long enough to
                                    demonstrate the retention of dual-level indent.
                                    This isn't.
                                    This is probably a fifth paragraph, but we're not making a
                                    psychic interface here. Um, ok, the user still needs to be smart.

                                    would be reformatted to

                                    This is a paragraph greatly in need of 'gq'.
                                    This is a paragraph which needs no help.
                                    This is another paragraph which must be fixed. It also happens
                                    to be long enough to demonstrate the retention of dual-level indent.
                                    This isn't. This is probably a fifth paragraph, but we're not
                                    making a
                                    psychic interface here. Um, ok, the user still needs to be smart.

                                    > :h formatting
                                    >
                                    > and especially
                                    >
                                    > :h gq
                                    >
                                    > So when you're done re-arranging your paragraph, just put your cursor on
                                    > it and type "gqap" ("reformat a paragraph"). Viola, it's 'textwidth'
                                    > columns wide. :-) And it will stay that way even in dumb
                                    > editors/viewers such as `cat' and `more', instead of being dependant on
                                    > an intelligent viewer/editor that cat do line wrapping at word
                                    > boundaries.
                                    >
                                    > "Really" wrapped text also works better with tools like grep, for
                                    > example. When you grep for something on non-wrapped text (such as what
                                    > you currently use), you'll always get entire paragraphs listed as
                                    > matches, instead of the single lines you'd expect.

                                    Sometimes, you want this. At times like that, however,

                                    perl -00 -ne '/pattern/ && print'

                                    comes in *really* handy.

                                    Ed
                                  Your message has been successfully submitted and would be delivered to recipients shortly.