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

Wish: A "relative" (or full view) version of showmarks

Expand Messages
  • Mun Johl
    Hi, Ever since I started using showmarks.vim, it inspired me to want a show relative position feature. That is, similar to the columns on the left hand side
    Message 1 of 6 , Aug 28, 2004
    • 0 Attachment
      Hi,

      Ever since I started using showmarks.vim, it inspired me to want a "show
      relative position" feature. That is, similar to the columns on the left
      hand side of showmarks, I would like a relative position column which
      gives a "full view" of the file and the relative position of the cursor
      and any marks. Something like this:

      0% +--+ 0% and 100% represent the begin and end of file (duh).
      | | Not really needed, just shown for clarity.
      | | "[abc]>" represent the relative mark positions.
      |b>| "->" represents the relative cursor position.
      | |
      | | This sort of representation would help one keep track of
      | | where marks have been placed as well as the current cursor
      |c>| position in a "relative" view.
      |a>|
      | | I realize this can get difficult to manage when marks are
      | | placed in close proximity in especially a large file.
      | | But maybe there could be zoom feature to get better
      |->| granularity when several marks are close together.
      | |
      | | I know, talk is cheap and maybe this is not worth the
      | | effort. But I decided I'd finally submit this to the
      | | group and see if I could conjure up any interest for
      | | it's implementation.
      | |
      | |
      | |
      | |
      | |
      | |
      100% +--+

      Thanks for listening.

      --
      Mun
    • Keith Roberts
      ... Without any effort at all, you can add relative position to the statusline. Here s what I use: set stl=[%n]%f %m%r%y%
      Message 2 of 6 , Aug 30, 2004
      • 0 Attachment
        >-----Original Message-----
        >From: Mun Johl [mailto:mun_johl@...]
        >Sent: Saturday, August 28, 2004 12:17 PM
        >To: VIM Developers
        >Subject: Wish: A "relative" (or full view) version of showmarks
        >
        >Hi,
        >
        >Ever since I started using showmarks.vim, it inspired me to
        >want a "show relative position" feature. That is, similar to
        >the columns on the left hand side of showmarks, I would like a
        >relative position column which gives a "full view" of the file
        >and the relative position of the cursor and any marks.
        >Something like this:
        >
        > 0% +--+ 0% and 100% represent the begin and end of file (duh).
        > | | Not really needed, just shown for clarity.
        > | | "[abc]>" represent the relative mark positions.
        > |b>| "->" represents the relative cursor position.
        > | |
        > | | This sort of representation would help one keep track of
        > | | where marks have been placed as well as the current cursor
        > |c>| position in a "relative" view.
        > |a>|
        > | | I realize this can get difficult to manage when marks are
        > | | placed in close proximity in especially a large file.
        > | | But maybe there could be zoom feature to get better
        > |->| granularity when several marks are close together.
        > | |
        > | | I know, talk is cheap and maybe this is not worth the
        > | | effort. But I decided I'd finally submit this to the
        > | | group and see if I could conjure up any interest for
        > | | it's implementation.
        > | |
        > | |
        > | |
        > | |
        > | |
        > | |
        >100% +--+

        Without any effort at all, you can add relative position to the
        statusline. Here's what I use:

        set stl=[%n]%f\ %m%r%y%<{%{&ff}}\ %=%l,%c%V=%p%%

        The cogent part is the =%p%%, which puts the percentage %p% at the right
        side of the line, preceded by '=' and followed by '%'.

        :h 'statusline'
      • Mun Johl
        Hi Keith, On Mon, Aug 30, 2004 at 09:12 AM PDT, Keith Roberts wrote: ... Text Deleted ... KR Without any effort at all, you can add relative position to the
        Message 3 of 6 , Aug 30, 2004
        • 0 Attachment
          Hi Keith,

          On Mon, Aug 30, 2004 at 09:12 AM PDT, Keith Roberts wrote:

          ... Text Deleted ...

          KR> Without any effort at all, you can add relative position to the
          KR> statusline. Here's what I use:
          KR>
          KR> set stl=[%n]%f\ %m%r%y%<{%{&ff}}\ %=%l,%c%V=%p%%
          KR>
          KR> The cogent part is the =%p%%, which puts the percentage %p% at the right
          KR> side of the line, preceded by '=' and followed by '%'.

          I actually already use %p in my statusline; but I guess a "graphical"
          display would help me keep track of relative positions better than a
          percentage value. Especially when editing large files where the
          percentage doesn't change for a large number of lines.

          Maybe it's just me.

          Thanks for the reply, Keith.

          KR> :h 'statusline'

          --
          Mun
        • Ilya Sher
          ... Hash: SHA1 ... the right ... Might happen I miss something but graphical representation have to have more than 100 (of the bar ) lines to reflect a
          Message 4 of 6 , Aug 31, 2004
          • 0 Attachment
            -----BEGIN PGP SIGNED MESSAGE-----
            Hash: SHA1

            Mun Johl wrote:
            | Hi Keith,
            |
            | On Mon, Aug 30, 2004 at 09:12 AM PDT, Keith Roberts wrote:
            |
            | ... Text Deleted ...
            |
            | KR> Without any effort at all, you can add relative position to the
            | KR> statusline. Here's what I use:
            | KR>
            | KR> set stl=[%n]%f\ %m%r%y%<{%{&ff}}\ %=%l,%c%V=%p%%
            | KR>
            | KR> The cogent part is the =%p%%, which puts the percentage %p% at
            the right
            | KR> side of the line, preceded by '=' and followed by '%'.
            |
            | I actually already use %p in my statusline; but I guess a "graphical"
            | display would help me keep track of relative positions better than a
            | percentage value. Especially when editing large files where the
            | percentage doesn't change for a large number of lines.
            Might happen I miss something but "graphical" representation
            have to have more than 100 (of the "bar") lines to reflect
            a change in position that is smaller then 1%...
            |
            | Maybe it's just me.
            |
            | Thanks for the reply, Keith.
            |
            | KR> :h 'statusline'
            |

            -----BEGIN PGP SIGNATURE-----
            Version: GnuPG v1.2.4 (GNU/Linux)
            Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

            iD8DBQFBNDhwcrmCGtFx9Y8RAoTBAKDKDE/WVDHNGi64dlobcuJxnFr/5gCgtvdq
            6W/jcBJ7SIsOlSoTw8iWGD8=
            =dRWT
            -----END PGP SIGNATURE-----
          • Keith Roberts
            ... Umm... I don t understand this. For a large file where the percentage doesn t change for a large number of lines, what will your columnar display show you
            Message 5 of 6 , Aug 31, 2004
            • 0 Attachment
              >-----Original Message-----
              >From: Mun Johl [mailto:mun_johl@...]
              >Sent: Monday, August 30, 2004 3:31 PM
              >To: VIM Developers
              >Subject: Re: Wish: A "relative" (or full view) version of showmarks
              >
              >Hi Keith,
              >
              >On Mon, Aug 30, 2004 at 09:12 AM PDT, Keith Roberts wrote:
              >
              >... Text Deleted ...
              >
              >KR> Without any effort at all, you can add relative position to the
              >KR> statusline. Here's what I use:
              >KR>
              >KR> set stl=[%n]%f\ %m%r%y%<{%{&ff}}\ %=%l,%c%V=%p%%
              >KR>
              >KR> The cogent part is the =%p%%, which puts the percentage %p% at the
              >KR> right side of the line, preceded by '=' and followed by '%'.
              >
              >I actually already use %p in my statusline; but I guess a "graphical"
              >display would help me keep track of relative positions better
              >than a percentage value. Especially when editing large files
              >where the percentage doesn't change for a large number of lines.

              Umm... I don't understand this. For a large file where the percentage
              doesn't change for a large number of lines, what will your columnar
              display show you that is different? I didn't even see a percentage
              indicator for the cursor line.

              Or was it your intention that the top and bottom lines would contain the
              percentages for those lines? Say, 45(%) and 50(%) for lines 226 thru
              250 of a 500 line file (and something in between for the current line).


              But, of course, the larger the file, and the fewer the screenlines in
              the window, the more likely those two numbers will be the same (say, for
              example, lines 226 thru 250 of a 5,000 line file).

              >Maybe it's just me.
              >
              >Thanks for the reply, Keith.
              >
              >KR> :h 'statusline'
              >
              >--
              >Mun
              >
              >
            • Mun Johl
              Hi Keith, Please see my comments below. On Tue, Aug 31, 2004 at 09:29 AM PDT, Keith Roberts wrote: KR -----Original Message----- KR From: Mun Johl
              Message 6 of 6 , Sep 4, 2004
              • 0 Attachment
                Hi Keith,

                Please see my comments below.

                On Tue, Aug 31, 2004 at 09:29 AM PDT, Keith Roberts wrote:
                KR> >-----Original Message-----
                KR> >From: Mun Johl [mailto:mun_johl@...]
                KR> >Sent: Monday, August 30, 2004 3:31 PM
                KR> >To: VIM Developers
                KR> >Subject: Re: Wish: A "relative" (or full view) version of showmarks
                KR> >
                KR> >Hi Keith,
                KR> >
                KR> >On Mon, Aug 30, 2004 at 09:12 AM PDT, Keith Roberts wrote:
                KR> >
                KR> >... Text Deleted ...
                KR> >
                KR> >KR> Without any effort at all, you can add relative position to the
                KR> >KR> statusline. Here's what I use:
                KR> >KR>
                KR> >KR> set stl=[%n]%f\ %m%r%y%<{%{&ff}}\ %=%l,%c%V=%p%%
                KR> >KR>
                KR> >KR> The cogent part is the =%p%%, which puts the percentage %p% at the
                KR> >KR> right side of the line, preceded by '=' and followed by '%'.
                KR> >
                KR> >I actually already use %p in my statusline; but I guess a "graphical"
                KR> >display would help me keep track of relative positions better
                KR> >than a percentage value. Especially when editing large files
                KR> >where the percentage doesn't change for a large number of lines.
                KR>
                KR> Umm... I don't understand this. For a large file where the percentage
                KR> doesn't change for a large number of lines, what will your columnar
                KR> display show you that is different? I didn't even see a percentage
                KR> indicator for the cursor line.

                I was hoping for a "zoom" type of functionality to get a more detailed
                view.

                KR> Or was it your intention that the top and bottom lines would contain the
                KR> percentages for those lines? Say, 45(%) and 50(%) for lines 226 thru
                KR> 250 of a 500 line file (and something in between for the current line).

                Right.

                KR> But, of course, the larger the file, and the fewer the screenlines in
                KR> the window, the more likely those two numbers will be the same (say, for
                KR> example, lines 226 thru 250 of a 5,000 line file).

                You make good points. And I thought of them as well. But I was just
                thinking that if those issues can get solved, it would make editing
                source files easier, IMHO. I have some large source files, and
                sometimes when I'm making changes and setting a lot of marks and such, I
                would just like a "high level" view of the relative position of the
                marks and cursor position.

                --
                Mun

                KR> >Maybe it's just me.
                KR> >
                KR> >Thanks for the reply, Keith.
                KR> >
                KR> >KR> :h 'statusline'
                KR> >
                KR> >--
                KR> >Mun
                KR> >
                KR> >
              Your message has been successfully submitted and would be delivered to recipients shortly.