list of search directories in mvim script #8

Closed
wants to merge 1 commit into
from

2 participants

@pvdb

Hi b4winckler,

The attached pull request adds /Developer/Applications and /Developer/Applications/Utilities to the list of directories that is searched for the MacVim.app bundle.

A second, minor change in the pull request refactors the way in which the vim sub-directory of each search directory on the list is processed.

Thanks for your consideration,

Peter Vandenberk

@pvdb pvdb 2 changes to the mvim script...
(1) adding /Developer/Applications and /Developer/Applications/Utilities to
    the list of directories that is searched for the mvim utility script

(2) refactor the way in which the vim subdirectory of each search directory
    is processed when looking for the mvim utility script
1dfefd8
@b4winckler
Owner

Hi Peter,

I must say I am a bit dubious about "encouraging" people to put apps in /Developer/Applications when the standard is to install apps in /Applications. What's your reasoning for this and why do you think other people would benefit from this?

Note that I am not the original author of this script and I even find it a bit weird that it looks in subfolders like Utilities and vim to begin with.

Björn

@pvdb

Hi Björn,

You wrote:

I must say I am a bit dubious about "encouraging" people to put apps in /Developer/Applications when the standard is to install apps in /Applications. What's your reasoning for this and why do you think other people would benefit from this?

I am in the middle of setting up a corporate development laptop, on which developers don't necessarily have write permissions to the /Applications folder, but are required to install their development tools to the /Developer/Applications folder... hence my submitted changes to the mvim script to also check those directories.

You wrote:

Note that I am not the original author of this script and I even find it a bit weird that it looks in subfolders like Utilities and vim to begin with.

I couldn't agree more, and would definitely agree with removing them from the list of search directories, but I guess from a backwards-compatibility point of view, that is a rather drastic change.

Thanks,

Peter

@b4winckler
Owner

Do you have any idea of common it is to disallow installs to /Applications but allowing them inside /Developer/Applications?

It sounds very arbitrary to me, but if this is common practice then I guess your patch makes sense.

@pvdb pvdb commented on the diff Feb 14, 2011
src/MacVim/mvim
if [ -x "$i/MacVim.app" ]; then
VIM_APP_DIR="$i"
break
fi
+ # next look in the 'vim' sub-directory...
+ if [ -x "$i/vim/MacVim.app" ]; then
+ VIM_APP_DIR="$i"
@pvdb
pvdb added a line comment Feb 14, 2011

Sorry, just noticed a "copy-n-paste" typo in this line... instead of:

VIM_APP_DIR="$i"

... it should read:

VIM_APP_DIR="$i/vim"

I will submit an updated pull requests... apologies for the confusion,

Peter V.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@pvdb

Hi Björn,

You wrote:

Do you have any idea of common it is to disallow installs to /Applications but allowing them inside /Developer/Applications?

I'm afraid not... this is the first time I encounter it as well.

You wrote:

It sounds very arbitrary to me, but if this is common practice then I guess your patch makes sense.

After having giving it more thought, I kinda like the separation of /Applications and /Developer/Applications, and TBH a couple of directories more in the mvim script search path isn't gonna break the bank :-) ... it's already quite a list!

And as per your earlier comment, it might indeed make more sense to add /Developer/Applications, but remove the cruft, such as the vim and Utilities sub-directories.

Cheers,

Peter

@b4winckler
Owner

Hi Peter,

Since as you say this is a rare use case I do not want to complicate the script even more by merging this patch.

The recommended way to install apps if you don't have write permissions to /Applications is to use ~/Applications and the mvim script also checks this folder. If you really must use /Developer/Applications (or whatever strange location) the mvim script supports setting the environment variable VIM_APP_DIR to the folder MacVim.app is located.

Björn

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment