edenzik / macvim

Automatically exported from code.google.com/p/macvim
0 stars 0 forks source link

exrc option useless in macvim #181

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I just discovered the exrc option which would greatly help me when switching 
from one project to 
another. To those of you who don't know about this setting, it tells Vim to 
source ./.vimrc if it 
exists.

Unfortunately, macvim being an Aqua application, its initial working directory 
is always $HOME. 
Would it be possible to add an option to tell Vim to source ./.vimrc everytime 
the current directory 
is changed through :cd?

Original issue reported on code.google.com by n.oxyde on 25 May 2009 at 1:46

GoogleCodeExporter commented 9 years ago
I think you just need to change the way you open files so that the current 
directory is set appropriately.

E.g. all the following will set the pwd to the folder the file you open reside 
in:
1. Cmd-o -> browse to file and open
2. Double click file icon in Finder
3. Use the "mvim" script from terminal

Alternatively, you can always use :cd to change directory before opening files 
(with :e or whatever).

Original comment by bjorn.winckler@gmail.com on 25 May 2009 at 2:59

GoogleCodeExporter commented 9 years ago
I do use :cd to change directory within macvim. The problem is that the exrc 
option source ./.vimrc when 
launching vim only, not when changing directory. I would like an option which 
tells vim to source dir/.vimrc 
when I do :cd dir.

Original comment by n.oxyde on 25 May 2009 at 3:48

GoogleCodeExporter commented 9 years ago
Then alternative 3 should still work with this option.  Or is there a reason 
why you don't use the mvim script?

The first two probably won't but it is something I am trying to fix in another 
context already, so this should work 
sometime in the future.

I'm afraid I won't add any new options to Vim (unless they are specifically 
tied to the GUI on Mac) -- such 
requests should be made to the core Vim developers (who read the vim_dev google 
group).  Any new options 
added to core Vim automatically gets added to MacVim as well since the codebase 
is the same.

Original comment by bjorn.winckler@gmail.com on 25 May 2009 at 4:59

GoogleCodeExporter commented 9 years ago
I've finally fixed this problem (to be included in snapshot 52).

Original comment by bjorn.winckler@gmail.com on 1 Mar 2010 at 7:23