Sorry about that, probably typed that post in too much of a rush. I'm taking a programming course and will be using gvim (just looks a little nicer than normal vim-in-a-terminal). If I run just "gvim", I'll get a vim session with vim's "current directory" as my home directory. I'd like to be able to use vim to directly work on (i.e. edit, switch between, compile, run) files that are a few directories deeper. At this point, I'd have to do things like ":e src/spring06/project2/Foo.java" and "java src/spring06/project2/Foo", where I'd like to avoid typing the repeated part of the path. It's just a very small optimization, one that I could get by starting gvim and then doing ":cd src/spring06/project2", but there has to be a way to do that on startup, via a command-line option or something in the .vimrc. Thinking about it a little more I suppose I could do a shell script with something like "cd src/spring06/project2; gvim", but I'd like to do it the way it's supposed to be done.
One more clarification... the reason I can't just do "gvim src/spring06/project2/Foo.java" is I'll be editing and moving around between multiple files in that directory, and starting gvim that way (as far as I know) will still leave vim's current directory as my home directory.
Last edited by jrdioko; 01-20-2006 at 06:16 PM.