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

[OT] Bug or Feature?

Expand Messages
  • Andre Berger
    I don t know if it s a change in Vim 7.0, or a setting on my system-- anyway, I would like :w on a freshly started vim to behave as it did before, the way
    Message 1 of 17 , May 25, 2006
    • 0 Attachment
      I don't know if it's a change in Vim 7.0, or a setting on my system--
      anyway, I would like :w on a freshly started vim to behave as it did
      before, the way :saveas does (see the file you just wrote in the
      current buffer). Do you know what I mean?

      Unrelated and off-topic, but something that's been bugging me for a
      log time: Can I swap the behavior of gP and P in normal mode somehow?
      I find that cursor move one character to the left irritationg if not
      annoying and want to save a keystroke.

      -Andre
    • Chris Allen
      ... Err, I still get that message, certainly. As an aside, given that your questions have nothing to do with the Mac OS version of Vim specifically, you d
      Message 2 of 17 , May 25, 2006
      • 0 Attachment
        On 5/25/06, Andre Berger <andre.berger@...> wrote:
        > I don't know if it's a change in Vim 7.0, or a setting on my system--
        > anyway, I would like :w on a freshly started vim to behave as it did
        > before, the way :saveas does (see the file you just wrote in the
        > current buffer). Do you know what I mean?

        Err, I still get that message, certainly. As an aside, given that
        your questions have nothing to do with the Mac OS version of Vim
        specifically, you'd probably get better, faster answers on the main
        list ;)

        > Unrelated and off-topic, but something that's been bugging me for a
        > log time: Can I swap the behavior of gP and P in normal mode somehow?
        > I find that cursor move one character to the left irritationg if not
        > annoying and want to save a keystroke.

        You want nnoremap for that. Something like nnoremap P gP and nnoremap
        gP P (untested).

        HTH,
        Chris Allen
      • Andre Berger
        ... I see, thanks. ... Thank you so much Chris, it works!! -Andre
        Message 3 of 17 , May 25, 2006
        • 0 Attachment
          * Chris Allen (2006-05-26):
          > On 5/25/06, Andre Berger <andre.berger@...> wrote:
          > >I don't know if it's a change in Vim 7.0, or a setting on my system--
          > >anyway, I would like :w on a freshly started vim to behave as it did
          > >before, the way :saveas does (see the file you just wrote in the
          > >current buffer). Do you know what I mean?
          >
          > Err, I still get that message, certainly. As an aside, given that
          > your questions have nothing to do with the Mac OS version of Vim
          > specifically, you'd probably get better, faster answers on the main
          > list ;)

          I see, thanks.

          > >Unrelated and off-topic, but something that's been bugging me for a
          > >log time: Can I swap the behavior of gP and P in normal mode somehow?
          > >I find that cursor move one character to the left irritationg if not
          > >annoying and want to save a keystroke.
          >
          > You want nnoremap for that. Something like nnoremap P gP and nnoremap
          > gP P (untested).

          Thank you so much Chris, it works!!

          -Andre
        • Chris Allen
          ... Let s just have a second look at this one. You mean when you do something like :w foo you want to see, but do not see, a message like foo [New] 0L,
          Message 4 of 17 , May 25, 2006
          • 0 Attachment
            On 5/26/06, Andre Berger <andre.berger@...> wrote:
            > * Chris Allen (2006-05-26):
            > > On 5/25/06, Andre Berger <andre.berger@...> wrote:
            > > >I don't know if it's a change in Vim 7.0, or a setting on my system--
            > > >anyway, I would like :w on a freshly started vim to behave as it did
            > > >before, the way :saveas does (see the file you just wrote in the
            > > >current buffer). Do you know what I mean?

            Let's just have a second look at this one. You mean when you do
            something like ":w foo" you want to see, but do not see, a message
            like ""foo" [New] 0L, 0C written", or I am thinking of the wrong
            behaviour?

            > > Err, I still get that message, certainly. As an aside, given that
            > > your questions have nothing to do with the Mac OS version of Vim
            > > specifically, you'd probably get better, faster answers on the main
            > > list ;)
            >
            > I see, thanks.

            Sorry, that sounded a bit off-putting, didn't it. I didn't mean for
            it to, it is just that the Mac OS list seems to have very few readers,
            and I often see a message sitting on the list for days before an
            answer gets written, even to a simple query. By contrast, vim@...
            often (usually?) sees one or more replies within the hour.

            > > You want nnoremap for that. Something like nnoremap P gP and nnoremap
            > > gP P (untested).
            >
            > Thank you so much Chris, it works!!

            No problem, it was a bit of a rubbish answer, though, because I was in
            a hurry at the time. You might have read the manual and worked out
            how that worked, but mappings are complicated, so just in case you
            didn't understand it (mappings are complicated and often confuse
            people) I will explain it.

            Obviously, as you can tell, a map command makes one typed thing act as
            another, in this case it makes 'P' act as 'gP' and 'gP' act as 'P'.
            The command nnoremap is a contraction of three words, 'normal',
            'non-recursive', 'map'. Normal, as you know, is the mode, and map
            means that it is a key mapping. The non-recursive bit indicates
            whether the Right-Hand Side of the mapping (the actions to actually be
            taken, as opposed to the Left-Hand Side, which is the set of keys you
            typed) should follow other user-defined mappings recursively, or if it
            should use the built-in commands. Most mappings should probably be
            non-recursive, really. In this case, if you used nmap instead of
            nnoremap you'd have a recursive method with P calling gP which called
            P, and so on (except that Vim will notice and complain).

            Hope that helps,
            Chris Allen
          • Andre Berger
            ... Yes. I start vim without any command line-arguments, and get a no name (previously a no file ) buffer, about which I read in the upgrade information. So
            Message 5 of 17 , May 26, 2006
            • 0 Attachment
              * Chris Allen (2006-05-26):
              > On 5/26/06, Andre Berger <andre.berger@...> wrote:
              > >* Chris Allen (2006-05-26):
              > >> On 5/25/06, Andre Berger <andre.berger@...> wrote:
              > >> >I don't know if it's a change in Vim 7.0, or a setting on my system--
              > >> >anyway, I would like :w on a freshly started vim to behave as it did
              > >> >before, the way :saveas does (see the file you just wrote in the
              > >> >current buffer). Do you know what I mean?
              >
              > Let's just have a second look at this one. You mean when you do
              > something like ":w foo" you want to see, but do not see, a message
              > like ""foo" [New] 0L, 0C written", or I am thinking of the wrong
              > behaviour?

              Yes. I start vim without any command line-arguments, and get a "no
              name" (previously a "no file") buffer, about which I read in the
              upgrade information. So far, so good. I type my text, and save it to
              a file with ":w". Previous versions of Vim wrote the file and loaded
              it into the initial buffer, like ":saveas" does. 7.0.17 (my huge
              self-compiled version) just writes to the file, but keeps the noname
              buffer. I would like to have the old behavior back. I hope it's
              clearer what I mean now. I asked this here because I wasn't sure if
              that's a design change, Mac related, or a local problem.

              > >> You want nnoremap for that. Something like nnoremap P gP and nnoremap
              > >> gP P (untested).
              [snip detailed explanation]

              I appreciate it, Chris!

              -Andre
            • Chris Allen
              ... Interesting. I still get that behaviour, certainly, using 7.0.17, home-built huge. I can t think of a build option or runtime option to disable that, but
              Message 6 of 17 , May 26, 2006
              • 0 Attachment
                On 5/26/06, Andre Berger <andre.berger@...> wrote:
                > Yes. I start vim without any command line-arguments, and get a "no
                > name" (previously a "no file") buffer, about which I read in the
                > upgrade information. So far, so good. I type my text, and save it to
                > a file with ":w". Previous versions of Vim wrote the file and loaded
                > it into the initial buffer, like ":saveas" does. 7.0.17 (my huge
                > self-compiled version) just writes to the file, but keeps the noname
                > buffer. I would like to have the old behavior back. I hope it's
                > clearer what I mean now. I asked this here because I wasn't sure if
                > that's a design change, Mac related, or a local problem.

                Interesting. I still get that behaviour, certainly, using 7.0.17,
                home-built huge. I can't think of a build option or runtime option to
                disable that, but I certainly don't know everything. Can you give us
                the output of ':set'?

                Regards,
                Chris Allen
              • Benji Fisher
                ... When I open a new buffer and do ... I get an error message (E32). If Andre does this and gets a saved file, there must be something tricky going on. When
                Message 7 of 17 , May 26, 2006
                • 0 Attachment
                  On Fri, May 26, 2006 at 07:35:54PM +0100, Chris Allen wrote:
                  > On 5/26/06, Andre Berger <andre.berger@...> wrote:
                  > >Yes. I start vim without any command line-arguments, and get a "no
                  > >name" (previously a "no file") buffer, about which I read in the
                  > >upgrade information. So far, so good. I type my text, and save it to
                  > >a file with ":w". Previous versions of Vim wrote the file and loaded
                  > >it into the initial buffer, like ":saveas" does. 7.0.17 (my huge
                  > >self-compiled version) just writes to the file, but keeps the noname
                  > >buffer. I would like to have the old behavior back. I hope it's
                  > >clearer what I mean now. I asked this here because I wasn't sure if
                  > >that's a design change, Mac related, or a local problem.
                  >
                  > Interesting. I still get that behaviour, certainly, using 7.0.17,
                  > home-built huge. I can't think of a build option or runtime option to
                  > disable that, but I certainly don't know everything. Can you give us
                  > the output of ':set'?

                  When I open a new buffer and do

                  :w

                  I get an error message (E32). If Andre does this and gets a saved file,
                  there must be something tricky going on. When I do

                  :w /tmp/helloworld.txt

                  the buffer name becomes the same as the file. Curiously,

                  :messages

                  now shows the message about saving the new file twice ...

                  HTH --Benji Fisher
                • Andre Berger
                  ... [No Name] 0,0-1 All 06:29 /tmp/helloworld.txt [New] 0L, 0C [w] ... Messages maintainer: Bram Moolenaar /tmp/helloworld.txt [New] 0L, 0C
                  Message 8 of 17 , May 26, 2006
                  • 0 Attachment
                    * Benji Fisher (2006-05-27):
                    > On Fri, May 26, 2006 at 07:35:54PM +0100, Chris Allen wrote:
                    > > On 5/26/06, Andre Berger <andre.berger@...> wrote:
                    > > >Yes. I start vim without any command line-arguments, and get a "no
                    > > >name" (previously a "no file") buffer, about which I read in the
                    > > >upgrade information. So far, so good. I type my text, and save it to
                    > > >a file with ":w". Previous versions of Vim wrote the file and loaded
                    > > >it into the initial buffer, like ":saveas" does. 7.0.17 (my huge
                    > > >self-compiled version) just writes to the file, but keeps the noname
                    > > >buffer. I would like to have the old behavior back. I hope it's
                    > > >clearer what I mean now. I asked this here because I wasn't sure if
                    > > >that's a design change, Mac related, or a local problem.
                    > >
                    > > Interesting. I still get that behaviour, certainly, using 7.0.17,
                    > > home-built huge. I can't think of a build option or runtime option to
                    > > disable that, but I certainly don't know everything. Can you give us
                    > > the output of ':set'?
                    >
                    > When I open a new buffer and do
                    >
                    > :w
                    >
                    > I get an error message (E32). If Andre does this and gets a saved file,
                    > there must be something tricky going on. When I do
                    >
                    > :w /tmp/helloworld.txt
                    >
                    > the buffer name becomes the same as the file. Curiously,

                    :w /tmp/helloworld.txt
                    [No Name]
                    0,0-1 All 06:29 "/tmp/helloworld.txt" [New] 0L, 0C [w]

                    > :messages
                    >
                    > now shows the message about saving the new file twice ...

                    Messages maintainer: Bram Moolenaar <Bram@...>
                    "/tmp/helloworld.txt" [New] 0L, 0C [w]
                    "/tmp/helloworld.txt" [New] 0L, 0C [w]

                    VIM - Vi IMproved 7.0 (2006 May 7, compiled May 14 2006 07:13:56)
                    MacOS X (unix) version
                    Included patches: 1-17
                    Compiled by andre@...
                    Huge version with Carbon GUI. Features included (+) or not (-):
                    +arabic +autocmd -balloon_eval +browse ++builtin_terms +byte_offset +cindent
                    -clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments
                    +cryptv +cscope +cursorshape +dialog_con_gui +diff +digraphs -dnd -ebcdic
                    +emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path +find_in_path
                    +folding -footer +fork() +gettext -hangul_input +iconv +insert_expand +jumplist
                    +keymap +langmap +libcall +linebreak +lispindent +listcmds +localmap +menu
                    +mksession +modify_fname +mouse -mouseshape +mouse_dec -mouse_gpm
                    -mouse_jsbterm +mouse_netterm +mouse_xterm +multi_byte +multi_lang -mzscheme
                    -netbeans_intg -osfiletype +path_extra -perl +postscript +printer +profile
                    -python +quickfix +reltime +rightleft -ruby +scrollbind +signs +smartindent
                    -sniff +statusline -sun_workshop +syntax +tag_binary +tag_old_static
                    -tag_any_white -tcl +terminfo +termresponse +textobjects +title -toolbar
                    +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo +vreplace
                    +wildignore +wildmenu +windows +writebackup -X11 -xfontset -xim -xsmp
                    -xterm_clipboard -xterm_save
                    system vimrc file: "$VIM/vimrc"
                    user vimrc file: "$HOME/.vimrc"
                    user exrc file: "$HOME/.exrc"
                    system gvimrc file: "$VIM/gvimrc"
                    user gvimrc file: "$HOME/.gvimrc"
                    system menu file: "$VIMRUNTIME/menu.vim"
                    fall-back for $VIM: "/usr/local/etc/vim"
                    f-b for $VIMRUNTIME: "/optapps/Vim.app/Contents/Resources/runtime"
                    Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_MAC -fno-common -fpascal-strings -Wall -Wno-unknown-pragmas -mdynamic-no-pic -pipe -I. -Iproto -arch ppc -DMACOS_X_UNIX -no-cpp-precomp -I/Developer/Headers/FlatCarbon -Os
                    Linking: gcc -arch ppc -L/usr/local/lib -o Vim -framework Carbon -lncurses -liconv -lintl

                    --- Options ---
                    antialias ignorecase report=0 syntax=mail
                    autoindent incsearch ruler tabstop=2
                    autowrite nojoinspaces scroll=17 textwidth=69
                    backupcopy=yes laststatus=2 secure ttyfast
                    cpoptions=$ lazyredraw shiftwidth=2 ttyscroll=0
                    expandtab linebreak shortmess=at virtualedit=block
                    filetype=mail nomacatsui showbreak=\ visualbell
                    foldmethod=syntax nomodeline showcmd wildmenu
                    helpheight=0 modelines=1 showmatch window=35
                    helplang=en modified smartcase
                    hidden mouse=a splitbelow
                    history=50 pastetoggle=<F8> nostartofline
                    backspace=indent,eol,start
                    backupdir=~/Tmp/Vim,~/Tmp,,.,~/tmp,~/
                    comments=b:#,:%,fb:-,n:>,n:)
                    complete=.,w,b,u,t,i,k$VIMRUNTIME/syntax/mail.vim
                    directory=~/Tmp/Vim,~/Tmp,,.,~/tmp,~/
                    fileencoding=utf-8
                    fileencodings=ucs-bom,utf-8,default,latin1
                    fileformats=unix,dos,mac
                    foldtext=XMLFoldLabel()
                    formatoptions=rontcql
                    guifont=Monaco:h14
                    highlight=8r,db,es,hs,mb,Mr,nu,rs,sr,tb,vr,ws
                    iskeyword=@,48-57,_,192-255,-,.,@-@
                    listchars=tab:><b7>,trail:<b7>
                    runtimepath=~/.vim,/optapps/Vim.app/Contents/Resources/vimfiles,/optapps/Vim.a
                    pp/Contents/Resources/runtime,/usr/local/share/vim,/optapps/Vim.app/Contents/Res
                    ources/vimfiles/after,~/.vim/after
                    statusline=%<%0.57F%h%m%r%= %l,%c%V %P %{strftime("%H:%M")}
                    suffixes=.bak,~,%~.swp,.o,.info,.aux,.gz,.tgz,.tar,.bz2,.log,.dvi,.bbl,.blg,.b
                    rf,.cb,.ind,.idx,.ilg,.inx,.out,.toc,.ps,.swp
                    termencoding=macroman
                    titlestring=/private/tmp/muttng-hvk-502-3021-9774-6562e1673ebc6531 - Vim (hvk.
                    local)
                    viminfo=%,'1000,f1,"1000,:100,@100,/100,n~/.viminfo
                    whichwrap=<,>,h,l,[,]
                    wildmode=longest,list

                    -Andre
                  • Chris Allen
                    ... Ah, my understanding of the problem you re describing is clearly incorrect -- this is exactly what I see, and what I thought you were asking about. Can
                    Message 9 of 17 , May 26, 2006
                    • 0 Attachment
                      On 5/27/06, Andre Berger <andre.berger@...> wrote:
                      > :w /tmp/helloworld.txt
                      > [No Name]
                      > 0,0-1 All 06:29 "/tmp/helloworld.txt" [New] 0L, 0C [w]

                      Ah, my understanding of the problem you're describing is clearly
                      incorrect -- this is exactly what I see, and what I thought you were
                      asking about. Can you clarify exactly what different behaviour you
                      would like to see?

                      > > :messages
                      > >
                      > > now shows the message about saving the new file twice ...

                      Hmm, so it does. That looks like a bug to me.

                      Regards,
                      Chris Allen
                    • Andre Berger
                      ... In the above ( vim on the command line with no filename given), :w should behave like :saveas in the case of the initial NoName buffer. I find the new
                      Message 10 of 17 , May 26, 2006
                      • 0 Attachment
                        * Chris Allen (2006-05-27):
                        > On 5/27/06, Andre Berger <andre.berger@...> wrote:
                        > >:w /tmp/helloworld.txt
                        > >[No Name]
                        > >0,0-1 All 06:29 "/tmp/helloworld.txt" [New] 0L, 0C [w]
                        >
                        > Ah, my understanding of the problem you're describing is clearly
                        > incorrect -- this is exactly what I see, and what I thought you were
                        > asking about. Can you clarify exactly what different behaviour you
                        > would like to see?

                        In the above ("vim" on the command line with no filename given), :w
                        should behave like :saveas in the case of the initial NoName buffer.
                        I find the new behavior unintuitive (though admittedly more
                        consistent as far as the commands are concerned).

                        -Andre
                      • Chris Allen
                        ... The behaviour of thw two commands appears to be identical for me, which is probably the source of my confusion ;) Regards, Chris Allen
                        Message 11 of 17 , May 26, 2006
                        • 0 Attachment
                          On 5/27/06, Andre Berger <andre.berger@...> wrote:
                          > In the above ("vim" on the command line with no filename given), :w
                          > should behave like :saveas in the case of the initial NoName buffer.
                          > I find the new behavior unintuitive (though admittedly more
                          > consistent as far as the commands are concerned).

                          The behaviour of thw two commands appears to be identical for me,
                          which is probably the source of my confusion ;)

                          Regards,
                          Chris Allen
                        • Ned Konz
                          ... It seems to be a local problem, or maybe your vimrc or other script files are strange somehow. On my 7.0.017 version, :w foo and :saveas foo behave
                          Message 12 of 17 , May 27, 2006
                          • 0 Attachment
                            Andre Berger wrote:
                            > * Chris Allen (2006-05-26):
                            >> On 5/26/06, Andre Berger <andre.berger@...> wrote:
                            >>> * Chris Allen (2006-05-26):
                            >>>> On 5/25/06, Andre Berger <andre.berger@...> wrote:
                            >>>>> I don't know if it's a change in Vim 7.0, or a setting on my system--
                            >>>>> anyway, I would like :w on a freshly started vim to behave as it did
                            >>>>> before, the way :saveas does (see the file you just wrote in the
                            >>>>> current buffer). Do you know what I mean?
                            >> Let's just have a second look at this one. You mean when you do
                            >> something like ":w foo" you want to see, but do not see, a message
                            >> like ""foo" [New] 0L, 0C written", or I am thinking of the wrong
                            >> behaviour?
                            >
                            > Yes. I start vim without any command line-arguments, and get a "no
                            > name" (previously a "no file") buffer, about which I read in the
                            > upgrade information. So far, so good. I type my text, and save it to
                            > a file with ":w". Previous versions of Vim wrote the file and loaded
                            > it into the initial buffer, like ":saveas" does. 7.0.17 (my huge
                            > self-compiled version) just writes to the file, but keeps the noname
                            > buffer. I would like to have the old behavior back. I hope it's
                            > clearer what I mean now. I asked this here because I wasn't sure if
                            > that's a design change, Mac related, or a local problem.

                            It seems to be a local problem, or maybe your vimrc or other script
                            files are strange somehow. On my 7.0.017 version, ":w foo" and ":saveas
                            foo" behave exactly the same, which is also what you describe wanting to
                            have happen.


                            Try this:


                            rm -f foo vimmsg.txt
                            vim -u NONE -U NONE -c 'redir > vimmsg.txt' -c 'w foo' -c messages -c q
                            cat vimmsg.txt


                            and tell us what you get.


                            --
                            Ned Konz
                            ned@...
                            http://bike-nomad.com
                          • Andre Berger
                            ... [...] ... [...] ... $ cat vimmsg.txt foo foo [New File] 0 lines, 0 characters written Messages maintainer: Bram Moolenaar You re right,
                            Message 13 of 17 , May 27, 2006
                            • 0 Attachment
                              * Ned Konz (2006-05-28):
                              > Andre Berger wrote:
                              > >* Chris Allen (2006-05-26):
                              > >>On 5/26/06, Andre Berger <andre.berger@...> wrote:
                              > >>>* Chris Allen (2006-05-26):
                              > >>>>On 5/25/06, Andre Berger <andre.berger@...> wrote:
                              > >>>>>I don't know if it's a change in Vim 7.0, or a setting on my system--
                              > >>>>>anyway, I would like :w on a freshly started vim to behave as it did
                              > >>>>>before, the way :saveas does (see the file you just wrote in the
                              > >>>>>current buffer). Do you know what I mean?
                              > >>Let's just have a second look at this one. You mean when you do
                              > >>something like ":w foo" you want to see, but do not see, a message
                              > >>like ""foo" [New] 0L, 0C written", or I am thinking of the wrong
                              > >>behaviour?
                              > >Yes. I start vim without any command line-arguments, and get a "no
                              > >name" (previously a "no file") buffer, about which I read in the
                              > >upgrade information. So far, so good. I type my text, and save it to
                              > >a file with ":w". Previous versions of Vim wrote the file and loaded
                              > >it into the initial buffer, like ":saveas" does. 7.0.17 (my huge
                              > >self-compiled version) just writes to the file, but keeps the noname
                              > >buffer. I would like to have the old behavior back. I hope it's
                              > >clearer what I mean now. I asked this here because I wasn't sure if
                              > >that's a design change, Mac related, or a local problem.
                              >
                              > It seems to be a local problem, or maybe your vimrc or other script files are strange somehow.
                              > On my 7.0.017 version, ":w foo" and ":saveas foo" behave exactly the same, which is also what
                              > you describe wanting to have happen.
                              [...]
                              > rm -f foo vimmsg.txt
                              > vim -u NONE -U NONE -c 'redir > vimmsg.txt' -c 'w foo' -c messages -c q
                              > cat vimmsg.txt
                              [...]
                              > and tell us what you get.

                              $ cat vimmsg.txt

                              "foo"
                              "foo" [New File] 0 lines, 0 characters written
                              Messages maintainer: Bram Moolenaar <Bram@...>

                              You're right, it seems to be related to my vimrc. It's been working
                              fine with all versions < 7. Sigh.

                              -Andre
                            • Andre Berger
                              ... I have not been able to locate the problem, and haven t got a response in comp.editors either. If anyone know a solution, please post it. I tried again: rm
                              Message 14 of 17 , Jun 4, 2006
                              • 0 Attachment
                                * Andre Berger (2006-05-28):
                                > * Ned Konz (2006-05-28):
                                > > Andre Berger wrote:
                                > > >* Chris Allen (2006-05-26):
                                > > >>On 5/26/06, Andre Berger <andre.berger@...> wrote:
                                > > >>>* Chris Allen (2006-05-26):
                                > > >>>>On 5/25/06, Andre Berger <andre.berger@...> wrote:
                                > > >>>>>I don't know if it's a change in Vim 7.0, or a setting on my system--
                                > > >>>>>anyway, I would like :w on a freshly started vim to behave as it did
                                > > >>>>>before, the way :saveas does (see the file you just wrote in the
                                > > >>>>>current buffer). Do you know what I mean?
                                > > >>Let's just have a second look at this one. You mean when you do
                                > > >>something like ":w foo" you want to see, but do not see, a message
                                > > >>like ""foo" [New] 0L, 0C written", or I am thinking of the wrong
                                > > >>behaviour?
                                > > >Yes. I start vim without any command line-arguments, and get a "no
                                > > >name" (previously a "no file") buffer, about which I read in the
                                > > >upgrade information. So far, so good. I type my text, and save it to
                                > > >a file with ":w". Previous versions of Vim wrote the file and loaded
                                > > >it into the initial buffer, like ":saveas" does. 7.0.17 (my huge
                                > > >self-compiled version) just writes to the file, but keeps the noname
                                > > >buffer. I would like to have the old behavior back. I hope it's
                                > > >clearer what I mean now. I asked this here because I wasn't sure if
                                > > >that's a design change, Mac related, or a local problem.
                                > >
                                > > It seems to be a local problem, or maybe your vimrc or other script files are strange somehow.
                                > > On my 7.0.017 version, ":w foo" and ":saveas foo" behave exactly the same, which is also what
                                > > you describe wanting to have happen.
                                > [...]
                                > > rm -f foo vimmsg.txt
                                > > vim -u NONE -U NONE -c 'redir > vimmsg.txt' -c 'w foo' -c messages -c q
                                > > cat vimmsg.txt
                                > [...]
                                > > and tell us what you get.
                                >
                                > $ cat vimmsg.txt
                                >
                                > "foo"
                                > "foo" [New File] 0 lines, 0 characters written
                                > Messages maintainer: Bram Moolenaar <Bram@...>
                                >
                                > You're right, it seems to be related to my vimrc. It's been working
                                > fine with all versions < 7. Sigh.

                                I have not been able to locate the problem, and haven't got a
                                response in comp.editors either. If anyone know a solution, please
                                post it.

                                I tried again:

                                rm -f foo vimmsg.txt
                                /optapps/Vim.app/Contents/MacOS/Vim -u NONE -U NONE -c 'redir > vimmsg.txt' -c 'w foo' -c messages -c q
                                cat vimmsg.txt

                                Error detected while processing command line:
                                E13: File exists (add ! to override)
                                Messages maintainer: Bram Moolenaar <Bram@...>
                                Error detected while processing command line:

                                -Andre
                              • Andre Berger
                                ... I could track the problem down, and it looks like a bug to me: The problem exists with set cpoptions=$ change to $ only, on Vim 6 -Andre
                                Message 15 of 17 , Jun 4, 2006
                                • 0 Attachment
                                  * Andre Berger (2006-06-04):
                                  > * Andre Berger (2006-05-28):
                                  > > * Ned Konz (2006-05-28):
                                  > > > Andre Berger wrote:
                                  > > > >* Chris Allen (2006-05-26):
                                  > > > >>On 5/26/06, Andre Berger <andre.berger@...> wrote:
                                  > > > >>>* Chris Allen (2006-05-26):
                                  > > > >>>>On 5/25/06, Andre Berger <andre.berger@...> wrote:
                                  > > > >Yes. I start vim without any command line-arguments, and get a "no
                                  > > > >name" (previously a "no file") buffer, about which I read in the
                                  > > > >upgrade information. So far, so good. I type my text, and save it to
                                  > > > >a file with ":w". Previous versions of Vim wrote the file and loaded
                                  > > > >it into the initial buffer, like ":saveas" does. 7.0.17 (my huge
                                  > > > >self-compiled version) just writes to the file, but keeps the noname
                                  > > > >buffer. I would like to have the old behavior back. I hope it's
                                  > > > >clearer what I mean now. I asked this here because I wasn't sure if
                                  > > > >that's a design change, Mac related, or a local problem.

                                  I could track the problem down, and it looks like a bug to me: The
                                  problem exists with

                                  set cpoptions=$ " change to $

                                  only, on Vim > 6

                                  -Andre
                                • Benji Fisher
                                  ... Maybe I have lost track and need to be reminded what the problem is. If you set cpo to $ then you have removed the F flag, so (it seems to me) this
                                  Message 16 of 17 , Jun 5, 2006
                                  • 0 Attachment
                                    On Sun, Jun 04, 2006 at 08:03:09PM +0200, Andre Berger wrote:
                                    > * Andre Berger (2006-06-04):
                                    > > * Andre Berger (2006-05-28):
                                    > > > * Ned Konz (2006-05-28):
                                    > > > > Andre Berger wrote:
                                    > > > > >* Chris Allen (2006-05-26):
                                    > > > > >>On 5/26/06, Andre Berger <andre.berger@...> wrote:
                                    > > > > >>>* Chris Allen (2006-05-26):
                                    > > > > >>>>On 5/25/06, Andre Berger <andre.berger@...> wrote:
                                    > > > > >Yes. I start vim without any command line-arguments, and get a "no
                                    > > > > >name" (previously a "no file") buffer, about which I read in the
                                    > > > > >upgrade information. So far, so good. I type my text, and save it to
                                    > > > > >a file with ":w". Previous versions of Vim wrote the file and loaded
                                    > > > > >it into the initial buffer, like ":saveas" does. 7.0.17 (my huge
                                    > > > > >self-compiled version) just writes to the file, but keeps the noname
                                    > > > > >buffer. I would like to have the old behavior back. I hope it's
                                    > > > > >clearer what I mean now. I asked this here because I wasn't sure if
                                    > > > > >that's a design change, Mac related, or a local problem.
                                    >
                                    > I could track the problem down, and it looks like a bug to me: The
                                    > problem exists with
                                    >
                                    > set cpoptions=$ " change to $
                                    >
                                    > only, on Vim > 6

                                    Maybe I have lost track and need to be reminded what the problem
                                    is. If you set 'cpo' to "$" then you have removed the "F" flag, so (it
                                    seems to me) this is the expected behavior. Does vim 6.x have the "F"
                                    flag in 'cpo'?

                                    HTH --Benji Fisher
                                  • Andre Berger
                                    ... Nevermind. cpo set to the default parameters plus $, and the problem is gone. -Andre
                                    Message 17 of 17 , Jun 5, 2006
                                    • 0 Attachment
                                      * Benji Fisher (2006-06-05):
                                      > On Sun, Jun 04, 2006 at 08:03:09PM +0200, Andre Berger wrote:
                                      > > * Andre Berger (2006-06-04):
                                      > > > * Andre Berger (2006-05-28):
                                      > > > > * Ned Konz (2006-05-28):
                                      > > > > > Andre Berger wrote:
                                      > > > > > >* Chris Allen (2006-05-26):
                                      > > > > > >>On 5/26/06, Andre Berger <andre.berger@...> wrote:
                                      > > > > > >>>* Chris Allen (2006-05-26):
                                      > > > > > >>>>On 5/25/06, Andre Berger <andre.berger@...> wrote:
                                      > > > > > >Yes. I start vim without any command line-arguments, and get a "no
                                      > > > > > >name" (previously a "no file") buffer, about which I read in the
                                      > > > > > >upgrade information. So far, so good. I type my text, and save it to
                                      > > > > > >a file with ":w". Previous versions of Vim wrote the file and loaded
                                      > > > > > >it into the initial buffer, like ":saveas" does. 7.0.17 (my huge
                                      > > > > > >self-compiled version) just writes to the file, but keeps the noname
                                      > > > > > >buffer. I would like to have the old behavior back. I hope it's
                                      > > > > > >clearer what I mean now. I asked this here because I wasn't sure if
                                      > > > > > >that's a design change, Mac related, or a local problem.
                                      > >
                                      > > I could track the problem down, and it looks like a bug to me: The
                                      > > problem exists with
                                      > >
                                      > > set cpoptions=$ " change to $
                                      > >
                                      > > only, on Vim > 6
                                      >
                                      > Maybe I have lost track and need to be reminded what the problem
                                      > is. If you set 'cpo' to "$" then you have removed the "F" flag, so (it
                                      > seems to me) this is the expected behavior. Does vim 6.x have the "F"
                                      > flag in 'cpo'?

                                      Nevermind. cpo set to the default parameters plus $, and the problem
                                      is gone.

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