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

RE: arg vs. buffer: what's the right paradigm? [was RE: argdel a nd session grief (6.0r)]

Expand Messages
  • Ron Aaron (Comforce/RhoTech)
    ... Ah, I grok! So in your model, one thinks of the argument list as the permanent list of files to work on, and buffers may include, but are not limited to
    Message 1 of 8 , Jan 3, 2001
    • 0 Attachment
      >Ron Aaron wrote:
      >> Can you explain what the difference is here?
      >Bram:
      >Generally, it's a list of files you want to work on.

      Ah, I grok!

      So in your model, one thinks of the argument list as the 'permanent'
      list of files to work on, and buffers may include, but are not limited
      to them.

      I find it a bit awkward that to work on a new file, I would have to
      :arga somefile
      :ar somefile

      and that simply:
      :edit somefile

      won't add it to the args list. Hmmm...
    • Vince Negri
      Isn t there one irritating difference between buffer and argument list? ... That makes sense in the old Vi-like meaning of the argument list, but is a real
      Message 2 of 8 , Jan 4, 2001
      • 0 Attachment
        Isn't there one irritating difference between buffer and argument list?

        :bnext wraps at the last buffer (good :)
        :next moans 'Cannot go beyond last file'

        That makes sense in the old Vi-like meaning of the argument list, but is a
        real
        pain when using the arglist as just 'these are the files I'm working on'.

        Vince


        Legal Disclaimer: Any views expressed by the sender of this message are
        not necessarily those of Application Solutions Ltd. Information in this
        e-mail may be confidential and is for the use of the intended recipient
        only, no mistake in transmission is intended to waive or compromise such
        privilege. Please advise the sender if you receive this e-mail by mistake.
      • Vince Negri
        ... What you want is to do ... Which adds and edits the file. *Really* intuitive huh? ;-)) perhaps :load could be made a synonym of :next ???? I agree with
        Message 3 of 8 , Jan 4, 2001
        • 0 Attachment
          > Ron Aaron (Comforce/RhoTech) [SMTP:a-rona@...] wrote:
          >
          > I find it a bit awkward that to work on a new file, I would have to
          > :arga somefile
          > :ar somefile

          > and that simply:
          > :edit somefile

          > won't add it to the args list. Hmmm...

          What you want is to do
          :next somefile

          Which adds and edits the file. *Really* intuitive huh? ;-))
          perhaps ":load" could be made a synonym of ":next"????

          I agree with the basic idea of arglist over bufferlist, but there are these
          basic niggles to be sorted out...

          Vince


          Legal Disclaimer: Any views expressed by the sender of this message are
          not necessarily those of Application Solutions Ltd. Information in this
          e-mail may be confidential and is for the use of the intended recipient
          only, no mistake in transmission is intended to waive or compromise such
          privilege. Please advise the sender if you receive this e-mail by mistake.
        • Bram Moolenaar
          ... I suppose it depends on what you expect. I like the message, so that I know that finished the list of files. If you have an unordered collection of
          Message 4 of 8 , Jan 4, 2001
          • 0 Attachment
            Vince Negri wrote:

            > Isn't there one irritating difference between buffer and argument list?
            >
            > :bnext wraps at the last buffer (good :)
            > :next moans 'Cannot go beyond last file'
            >
            > That makes sense in the old Vi-like meaning of the argument list, but is a
            > real pain when using the arglist as just 'these are the files I'm working
            > on'.

            I suppose it depends on what you expect. I like the message, so that I know
            that finished the list of files. If you have an unordered collection of
            files, you probably want it to wrap around. For the buffer list a wrap-around
            makes more sense, since the ordering of files in the buffer list is arbitrary.

            > I agree with the basic idea of arglist over bufferlist, but there are these
            > basic niggles to be sorted out...

            Right! We need to find out why people tend to use the buffer list and not use
            the arglist and fix this.

            The idea for a "edit a file and add it to the arglist" sounds like a good
            one. Currently we have:

            :edit file edit a file without adding to the arglist
            :next file edit a file and redefine the arglist
            :argadd file add a file to the arglist without editing it

            Now what would be the command for "edit a file and add it to the arglist"?

            :argedit file
            :editadd file
            :nextarg file
            :load file
            ?

            --
            hundred-and-one symptoms of being an internet addict:
            230. You spend your Friday nights typing away at your keyboard

            /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
            ((( Creator of Vim - http://www.vim.org -- ftp://ftp.vim.org/pub/vim )))
            \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///
          • Ron Aaron (Comforce/RhoTech)
            ... I also think that whereas using :next makes sense to a seasoned vi person, it makes less sense to a person like me who has only ever used vim (not vi),
            Message 5 of 8 , Jan 4, 2001
            • 0 Attachment
              >
              > What you want is to do
              > :next somefile
              >
              > Which adds and edits the file. *Really* intuitive huh? ;-))
              > perhaps ":load" could be made a synonym of ":next"????
              >
              > I agree with the basic idea of arglist over bufferlist, but
              > there are these
              > basic niggles to be sorted out...

              I also think that whereas using ':next' makes sense to a seasoned vi person,
              it makes less sense to a person like me who has only ever used vim (not vi),
              and even less to a newbie!

              Bram, I think that if you expect people to use the arg list, you need to
              make it more clear that it is the 'correct' way to do things; most
              especially, ':edit' a file should put it in the list, since you are
              declaring you want to work on a file! I realize this may break vi
              compatibility but then, that is what 'cpo' is for :-0

              Perhaps some part of the tutorial, or a help file, should discuss
              'recommended practices' ?

              Ron
            • Bram Moolenaar
              ... An :edit file command doesn t mean you want to add this file to the list of ... While editing one of the header files, I want to look in one of the
              Message 6 of 8 , Jan 4, 2001
              • 0 Attachment
                Ron Aaron wrote:

                > Bram, I think that if you expect people to use the arg list, you need to
                > make it more clear that it is the 'correct' way to do things; most
                > especially, ':edit' a file should put it in the list, since you are
                > declaring you want to work on a file! I realize this may break vi
                > compatibility but then, that is what 'cpo' is for :-0

                An ":edit file" command doesn't mean you want to add this file to the list of
                files you want to work on. For example, I could make a list of header files:

                :next *.h

                While editing one of the header files, I want to look in one of the associated
                C files:

                :e %:h.c

                This shouldn't add the .c file to the list of .h files.

                If you _do_ want to add the edited file to the list, you need the new command
                that we were talking about. It would do the equivalent of:

                :e file
                :argadd file

                > Perhaps some part of the tutorial, or a help file, should discuss
                > 'recommended practices' ?

                This should be in the User Manual. Using the argument list in examples will
                make clear how I look at it. This still has to be written...

                --
                hundred-and-one symptoms of being an internet addict:
                240. You think Webster's Dictionary is a directory of WEB sites.

                /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
                ((( Creator of Vim - http://www.vim.org -- ftp://ftp.vim.org/pub/vim )))
                \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///
              • Paul Moore
                From: Ron Aaron (Comforce/RhoTech) [mailto:a-rona@microsoft.com] ... I think that thisis the thing that has always frustrated me the most about the argument
                Message 7 of 8 , Jan 4, 2001
                • 0 Attachment
                  From: Ron Aaron (Comforce/RhoTech) [mailto:a-rona@...]
                  > So in your model, one thinks of the argument list as the 'permanent'
                  > list of files to work on, and buffers may include, but are not limited
                  > to them.
                  >
                  > I find it a bit awkward that to work on a new file, I would have to
                  > :arga somefile
                  > :ar somefile

                  ^^^ I think this needs to be :argu, not just :ar (see below...)

                  >
                  > and that simply:
                  > :edit somefile
                  >
                  > won't add it to the args list. Hmmm...

                  I think that thisis the thing that has always frustrated me the most about
                  the argument list. If I use :edit, I more-or-less expect the file I edited
                  to replace the current file in the argument list. I assume that this doesn't
                  happen for Vi compatibility reasons...?

                  By the way, I find it very non-intuitive that :arg is an abbreviation for
                  :args, and that :argument can only be abbreviated to :argu. Can the search
                  order be changed so that :arg is the abbreviation for :argument?

                  Actually, if :arg was the abbreviation for :argument, I wouldn't find the
                  sequence :edit x (to edit a new file for a moment) followed by :arg (to go
                  back to where I was in the argument list) nearly as unnatural.

                  Thanks,
                  Paul.
                • Bram Moolenaar
                  ... Yep. Everybody uses :edit all the time. Changing what it does is not a good idea. ... This is also because of Vi-compatibility. Vi didn t have
                  Message 8 of 8 , Jan 5, 2001
                  • 0 Attachment
                    Paul Moore wrote:

                    > > and that simply:
                    > > :edit somefile
                    > >
                    > > won't add it to the args list. Hmmm...
                    >
                    > I think that thisis the thing that has always frustrated me the most about
                    > the argument list. If I use :edit, I more-or-less expect the file I edited
                    > to replace the current file in the argument list. I assume that this doesn't
                    > happen for Vi compatibility reasons...?

                    Yep. Everybody uses ":edit" all the time. Changing what it does is not a
                    good idea.

                    > By the way, I find it very non-intuitive that :arg is an abbreviation for
                    > :args, and that :argument can only be abbreviated to :argu. Can the search
                    > order be changed so that :arg is the abbreviation for :argument?

                    This is also because of Vi-compatibility. Vi didn't have ":argument". With
                    the line of ":aedit", ":adelete", etc, we could have ":agoto" to replace
                    ":argument". Perhaps that's half a solution.

                    > Actually, if :arg was the abbreviation for :argument, I wouldn't find the
                    > sequence :edit x (to edit a new file for a moment) followed by :arg (to go
                    > back to where I was in the argument list) nearly as unnatural.

                    Well, you'll have to get used to ":argu". Vi compatibility is important. And
                    I don't want to make every little choice a flag in 'cpoptions', there are
                    enough of those already.

                    --
                    hundred-and-one symptoms of being an internet addict:
                    257. Your "hundred-and-one" lists include well over 101 items, since you
                    automatically interpret all numbers in hexadecimal notation.
                    (hex 101 = decimal 257)

                    /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
                    ((( Creator of Vim - http://www.vim.org -- ftp://ftp.vim.org/pub/vim )))
                    \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///
                  Your message has been successfully submitted and would be delivered to recipients shortly.