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

Re: 6.2: command line options (like +) appear as ex commands

Expand Messages
  • Bram Moolenaar
    ... I cannot reproduce this. Did you try adding -u NONE -U NONE ? If that helps it must be something in your startup scripts. -- hundred-and-one symptoms of
    Message 1 of 6 , Jun 2 12:22 PM
    • 0 Attachment
      Neil Bird wrote:

      > In the Tornado IDE we're currently using, I have Vim set up as
      > external editor:
      >
      > "D:\Program Files\Vim\vim62\gvim.exe" --cmd "exe 'cd '
      > fnamemodify('$filename',':p:h')" --servername tornado --remote-silent
      > +$lineno $filename
      >
      >
      > This used to work no probs., but now vim seems to be displaying those
      > command line commands as if I'd typed 'em, and asks for a prompt before
      > I can edit:
      >
      > :cd -
      > :2235
      > :call foreground()
      >
      > Hit ENTER or type command to continue
      >
      >
      > Am I missing an option now?

      I cannot reproduce this. Did you try adding "-u NONE -U NONE"? If that
      helps it must be something in your startup scripts.

      --
      hundred-and-one symptoms of being an internet addict:
      48. You get a tatoo that says "This body best viewed with Netscape 3.1 or
      higher."

      /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
      /// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\
      \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
      \\\ Help AIDS victims, buy at Amazon -- http://ICCF.nl/click1.html ///
    • Neil Bird
      Around about 02/06/2003 20:22, Bram Moolenaar typed ... ... This is going to be painful :-( I don t think I m going to find that it s any one thing in
      Message 2 of 6 , Jun 3 1:05 AM
      • 0 Attachment
        Around about 02/06/2003 20:22, Bram Moolenaar typed ...
        >>"D:\Program Files\Vim\vim62\gvim.exe" --cmd "exe 'cd '
        >>fnamemodify('$filename',':p:h')" --servername tornado --remote-silent
        >>+$lineno $filename
        >>
        >>:cd -
        >>:2235
        >>:call foreground()
        >>
        > I cannot reproduce this. Did you try adding "-u NONE -U NONE"? If that
        > helps it must be something in your startup scripts.

        This is going to be painful :-(

        I don't think I'm going to find that it's any one thing in
        particular, but some odd combination. If I run it from the cmd prompt
        (note again that I've not changed anything except move 6.1->6.2), then
        it seems to trigger or not trigger dependant upon filetype.

        Aha, I thought, esp. as (as suggested) -U NONE -u NONE doesn't
        reproduce it. However, there seems to be no one specific thing that
        makes it happen: moving my vimfiles stuff in & out of the path doesn't
        pin it down exactly.

        At elast, for cpp files, I've found two things that trigger it;
        e.g., my vimfiles/after/syntax/cpp,vim:


        if mapcheck('<bs>','i') == ''
        inoremap <silent> <unique> <buffer> <bs>
        <C-R>=<SID>CppInsertBackspace()<cr>
        endif

        " Backspace at end of line after auto-inserted commentstring '// ' wipes it
        function! s:CppInsertBackspace()
        let line = getline('.')
        if col('.') > strlen(line) && match(line,'// $') != -1 &&
        match(&comments,'//') != -1
        return "\<bs>\<bs>\<bs>"
        else
        return "\<bs>"
        endif
        endfunction


        If I comment out that function def., I can stop it happening ...
        until I move another set of defs. in as well. I'll follow up on those,
        but I suspect it'll be the same sort of thing.

        If I stare at start up, I *always* see these commands get displayed
        (-U/-u NONE maybe - comes up too quickly to be certain), it's just in
        some instances they generate a prompt. I feel certain that I have seen
        these commands in the history before (6.1) as well - they seem transient
        in 6.2, as :<up> doesn't show them.


        I'll report back if I find anything that makes sense :-/

        --
        [neil@fnx ~]# rm -f .signature
        [neil@fnx ~]# ls -l .signature
        ls: .signature: No such file or directory
        [neil@fnx ~]# exit
      • Neil Bird
        Around about 03/06/2003 09:05, Neil Bird typed ... ... Nope, I m stuck :-( The other thing whose removal stopped the problem was Dr. Chips C Stubs plugin -
        Message 3 of 6 , Jun 3 1:23 AM
        • 0 Attachment
          Around about 03/06/2003 09:05, Neil Bird typed ...
          > I'll report back if I find anything that makes sense :-/

          Nope, I'm stuck :-(

          The other thing whose removal 'stopped' the problem was Dr. Chips C
          Stubs plugin - and again, it was the mere 'function! <SID>' existence
          that did it.

          There are no messages, and (oddly) with -V I don't see the output
          that normally causes the prompt (:call foreground() etc.) - unless
          that's lost in the 'truncated...' bit of the popup you get from Win32
          gvim initially.

          I get a few lines over verbosity in the gvim window that's then wiped
          (but seem to end up in :messages) then a page full (+ prompt) then
          another partial page (but no prompt). I've stepped through this and
          can't see the aforementioned output.

          The only common factor seems to be an ftplugin-defined <SID>
          function. If I use the same IDE/mechanism to edit a file for which I
          have no ftplugin (e.g., .s ASM) it comes up OK.

          One more thing to check ...


          HA! If I don't set 'lazyredraw' in my _vimrc the problem doesn't
          occur. Does that help, Bram?

          --
          [neil@fnx ~]# rm -f .signature
          [neil@fnx ~]# ls -l .signature
          ls: .signature: No such file or directory
          [neil@fnx ~]# exit
        • Bram Moolenaar
          ... The rules for when to use the hit-enter prompt are quite complicated. Sometimes a message disappears that you wanted to see, sometimes the prompt appears
          Message 4 of 6 , Jun 3 12:28 PM
          • 0 Attachment
            Neil Bird wrote:

            > HA! If I don't set 'lazyredraw' in my _vimrc the problem doesn't
            > occur. Does that help, Bram?

            The rules for when to use the hit-enter prompt are quite complicated.
            Sometimes a message disappears that you wanted to see, sometimes the
            prompt appears when you don't want it.

            I think what happens when 'lazyredraw' is set is that there are still
            messages on the screen that would otherwise been removed by redrawing.
            Then you get the hit-enter prompt for the messages.

            I don't have time to figure out what exactly happens...
            Perhaps a ":redraw!" somewhere fixes your problem without resetting
            'lazyredraw'.

            --
            hundred-and-one symptoms of being an internet addict:
            75. You start wondering whether you could actually upgrade your brain
            with a Pentium Pro microprocessor 80. The upgrade works just fine.

            /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
            /// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\
            \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
            \\\ Help AIDS victims, buy at Amazon -- http://ICCF.nl/click1.html ///
          • Neil Bird
            Around about 03/06/2003 20:28, Bram Moolenaar typed ... ... It s awkward figuring out where it would go; the [automatic] lines that are appearing (e.g., :call
            Message 5 of 6 , Jun 4 4:11 AM
            • 0 Attachment
              Around about 03/06/2003 20:28, Bram Moolenaar typed ...
              > Perhaps a ":redraw!" somewhere fixes your problem without resetting
              > 'lazyredraw'.

              It's awkward figuring out where it would go; the [automatic] lines
              that are appearing (e.g., :call foreground()) never normally appear, do
              they? They certainly don't go in the history.

              --
              [neil@fnx ~]# rm -f .signature
              [neil@fnx ~]# ls -l .signature
              ls: .signature: No such file or directory
              [neil@fnx ~]# exit
            Your message has been successfully submitted and would be delivered to recipients shortly.