tags:

views:

54

answers:

1

After installing gVim and running gvim from the run window, if I were to type :cd followed by a tab, I will get \AppData, \Application Data, etc. Which basically means I'm at my $HOME directory (C:\Users\Fabian). The weird thing is I do not have a \Application Data folder there.

But if I were to run gvim.exe from its installation folder, and I type :cd followed by tab, I would get \autoload, \colors, etc. which means I'm at the installation folder.

And if I were to pin gvim.exe on to taskbar, upon launch and typing :cd then tab, I will get \Dictionaries and upon hitting tab again I get a beep.

I think for the last scenario, I'm at some Adobe folder. Anybody knows how to fix this weird issue? I'd like to pin it to taskbar and upon launch, start in the $HOME directory (C:\Users\Fabian).

+1  A: 

For Application Data: If you go to a command prompt, navigate to your User folder, and run dir /as, you'll see a line similar to this:

28-10-2009  18:03  <JUNCTION>  Application Data [C:\Users\Fabian\AppData\Roaming]

This is a junction point - a symlink to a folder. I believe it's there for backwards compatibility with programs which want to use that folder, but don't actually read the full folder name, instead assuming that it's just going to be "Application Data" in your user folder. Since it's flagged as a system folder, Windows hides it by default.

Making it start in the $HOME dierctory should be possible in a few ways. You can either:

  • Change the start-up directory for the shortcut, or
  • Add a line cd $HOME in your vimrc

The vimrc approach will make sure that Vim always changes the directory to $HOME on startup - even if opening other files - whereas the shortcut approach is, of course, per-shortcut. It's up to you to decide which approach suits you more.

Michael Madsen
But it shouldn't even start up in the Adobe folder. Before I reformatted my system (quite recently) I used vim (not gvim) and it always start up in my $HOME directory, without fail. I'm uninstalling ALL adobe products now to see what happens.
Fabian
@Fabian: I can't say I've experienced the problem myself, but then, I don't usually use the :cd command, so I'd probably not notice it anyway. Are you sure it wasn't simply set as the start-up directory on the shortcut?
Michael Madsen