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

Gvim starting up in C:\temp??

Expand Messages
  • Linda W
    ... Why would -N ever be needed when typing gvim ? -u NONE says to ignore my .vimrc but --cmd set shellslash says to execute that command before any .vimrc
    Message 1 of 5 , Jul 25 12:48 PM
    • 0 Attachment
      Ben Fritz wrote:
      > > I've never seen that problem, and I use shellslash in my config.
      > > Does it work with launching Vim as follows?
      > >
      > > gvim -N -u NONE -U NONE -i NONE --cmd "set shellslash" fb17X/content/firebug/chrome.js
      > >
      > > I know that the 'shellslash' option can make shellescape() do bad things on Windows, and it makes paths copied from Vim or passed to shell commands sometimes fail, but I don't know of any other ill effects.
      > >
      > >
      >
      Why would -N ever be needed when typing 'gvim'?

      -u NONE says to ignore my .vimrc
      but --cmd "set shellslash" says to execute that command before
      any .vimrc or .gvimrc.

      I made sure it was first in my .vimrc, since there was a
      set "set autochdir" about 3 lines in that could trigger a
      chdir I'd guess.

      So if shellslash was set first, ..

      Now I get... Ah ha... I figured out where it is executing
      I mistyped iotest as iotset and it came up
      saying there was a swap file C:\tmp/iotest

      Why is it in C:\tmp? (when I started in my home dir/profiledir).





      --
      --
      You received this message from the "vim_use" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php

      ---
      You received this message because you are subscribed to the Google Groups "vim_use" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • John Little
      ... See :help directory Regards, John Little -- -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the text you
      Message 2 of 5 , Jul 25 7:35 PM
      • 0 Attachment
        On Friday, July 26, 2013 7:48:20 AM UTC+12, Linda W wrote:

        > Why is it in C:\tmp? (when I started in my home dir/profiledir).

        See :help 'directory'

        Regards, John Little

        --
        --
        You received this message from the "vim_use" maillist.
        Do not top-post! Type your reply below the text you are replying to.
        For more information, visit http://www.vim.org/maillist.php

        ---
        You received this message because you are subscribed to the Google Groups "vim_use" group.
        To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
        For more options, visit https://groups.google.com/groups/opt_out.
      • Linda W
        ... But normally I see it open the file in the same directory as the file to edit. The problem here is that something seems to interfere with the set
        Message 3 of 5 , Jul 25 8:13 PM
        • 0 Attachment
          John Little wrote:
          > On Friday, July 26, 2013 7:48:20 AM UTC+12, Linda W wrote:
          >
          >> Why is it in C:\tmp? (when I started in my home dir/profiledir).
          >
          > See :help 'directory'
          >
          > Regards, John Little
          But normally I see it open the file in the same directory as the
          file to edit.

          The problem here is that something seems to interfere with the
          set shellslash option ... and instead of opening a swp file
          as "./bin/.iotest.swp, it's failing that and trying to use C:\tmp.

          Note. If I type in "gvim $PWD/bin/iotest", where
          "PWD" contains "/Users/lawa" it works.
          But just "bin/iotest", and "./bin/iotest" open a blank
          screen that says "New Directory" with the swap in C:\tmp.
          (that it can't write to)...not that it would be very helpful.




          --
          --
          You received this message from the "vim_use" maillist.
          Do not top-post! Type your reply below the text you are replying to.
          For more information, visit http://www.vim.org/maillist.php

          ---
          You received this message because you are subscribed to the Google Groups "vim_use" group.
          To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
          For more options, visit https://groups.google.com/groups/opt_out.
        • John Little
          I m not sure you understood my (possibly excessively) terse reply. What s your directory option set to? (I ve several times had it badly set due to copying
          Message 4 of 5 , Jul 26 4:08 AM
          • 0 Attachment
            I'm not sure you understood my (possibly excessively) terse reply.

            What's your 'directory' option set to?

            (I've several times had it badly set due to copying .vimrc from other systems, and I wonder if your trouble has a similar cause.)


            Regards, John Little

            --
            --
            You received this message from the "vim_use" maillist.
            Do not top-post! Type your reply below the text you are replying to.
            For more information, visit http://www.vim.org/maillist.php

            ---
            You received this message because you are subscribed to the Google Groups "vim_use" group.
            To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
            For more options, visit https://groups.google.com/groups/opt_out.
          • Ben Fritz
            ... Because if you re using -u NONE, then Vim will by default start with compatible set, which is normally not what you want. If you have any .vimrc at all,
            Message 5 of 5 , Jul 28 11:07 PM
            • 0 Attachment
              On Thursday, July 25, 2013 2:48:20 PM UTC-5, Linda W wrote:
              > Ben Fritz wrote:
              >
              > > > I've never seen that problem, and I use shellslash in my config.
              >
              > > > Does it work with launching Vim as follows?
              >
              > > >
              >
              > > > gvim -N -u NONE -U NONE -i NONE --cmd "set shellslash" fb17X/content/firebug/chrome.js
              >
              > > >
              >
              > > > I know that the 'shellslash' option can make shellescape() do bad things on Windows, and it makes paths copied from Vim or passed to shell commands sometimes fail, but I don't know of any other ill effects.
              >
              > > >
              >
              > > >
              >
              > >
              >
              > Why would -N ever be needed when typing 'gvim'?
              >
              >

              Because if you're using -u NONE, then Vim will by default start with 'compatible' set, which is normally not what you want. If you have any .vimrc at all, Vim starts with 'nocompatible' so I assumed you were using 'nocompatible' mode. Vim with 'compatible' set tries to act as much like plain posix vi as possible, meaning that it intentionally tries NOT to be improved.

              >
              > -u NONE says to ignore my .vimrc
              >
              > but --cmd "set shellslash" says to execute that command before
              >
              > any .vimrc or .gvimrc.
              >
              >

              Also, although this may not be explicit, before the file is read into Vim. -c may do the same thing in this situation but I'm not sure without consulting the help and/or experimenting.

              >
              > I made sure it was first in my .vimrc, since there was a
              >
              > set "set autochdir" about 3 lines in that could trigger a
              >
              > chdir I'd guess.
              >
              >

              Sure, but I was trying to get you to figure out whether Vim had a problem for everyone or just you. Since the behavior went away with that command it's just your config, so probably a patch to Vim isn't needed, we just need to find the problem in your config. Possibly there is an option acting in unexpected ways.

              I do wonder whether autochdir works with shellslash in weird ways in this situation. But I actually have both set too, and haven't noticed your problem when using my config.

              >
              > So if shellslash was set first, ..
              >
              >
              >
              > Now I get... Ah ha... I figured out where it is executing
              >
              > I mistyped iotest as iotset and it came up
              >
              > saying there was a swap file C:\tmp/iotest
              >
              >
              >
              > Why is it in C:\tmp? (when I started in my home dir/profiledir).

              I'm not sure how Vim determines its current working directory when not using autochdir and using relative paths. I do know that it will start in the directory of a file when you pass in the full path to that file, on Windows anyway. Normally when I start Vim with no arguments it starts in the installation directory.

              --
              --
              You received this message from the "vim_use" maillist.
              Do not top-post! Type your reply below the text you are replying to.
              For more information, visit http://www.vim.org/maillist.php

              ---
              You received this message because you are subscribed to the Google Groups "vim_use" group.
              To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
              For more options, visit https://groups.google.com/groups/opt_out.
            Your message has been successfully submitted and would be delivered to recipients shortly.