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

Re: Gvim starting up in C:\temp??

Expand Messages
  • 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 1 of 5 , Jul 28, 2013
    • 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.