edenzik / macvim

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

MacVim always starts up in your home directory ~/. when launching from Terminal #125

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I'm in the terminal and my current directory is somewhere inside of my project, 
like 
~/projects/foo/source 

I want to edit file foo.txt, so I type
MacVim foo.txt &

.. and it launches with a blank screen (created a file ~/foo.txt) because it 
starts up in my home dir 
all the time.

If I use regular vim, i.e. vim foo.tx, it works.

Original issue reported on code.google.com by eugu...@gmail.com on 10 Oct 2008 at 2:20

GoogleCodeExporter commented 9 years ago
I wanted to add that I have looked into the mailing list archive, and I found 
that this issue has been discussed, 
for instance:
http://groups.google.com/group/vim_mac/browse_thread/thread/e613256eefd6d31e/948
b0f8fe6e5543c?
lnk=gst&q=home+directory#948b0f8fe6e5543c
http://groups.google.com/group/vim_mac/browse_thread/thread/e613256eefd6d31e/948
b0f8fe6e5543c?
lnk=gst&q=home+directory#948b0f8fe6e5543c

However, the outcome of these discussions is silly: MacVim is useless in 
terminal right now.

Original comment by eugu...@gmail.com on 10 Oct 2008 at 2:35

GoogleCodeExporter commented 9 years ago
What does "MacVim foo.txt &" mean?  Have you created an alias called "MacVim" 
or what
exactly?

The recommended way of starting MacVim from Terminal (and one which works) is 
to use
the "mvim" script that comes bundled with MacVim (in the .tbz file).  You 
should put
that script in your path and then use "mvim file.foo" to start MacVim (it forks 
by
default so no need for "&" at the end).

Original comment by bjorn.winckler@gmail.com on 10 Oct 2008 at 2:38

GoogleCodeExporter commented 9 years ago
I've created a soft link /usr/bin/MacVim. Thank you for a quick response, I'll 
check out mvim when I get to my 
laptop. Sorry if I missed the existence of mvim. Where can read up on it? I'll 
try :help mvim when I get a chance.

Thank you.

Original comment by eugu...@gmail.com on 10 Oct 2008 at 5:23

GoogleCodeExporter commented 9 years ago
Ok, now I understand why you're running into problems: softlinks break certain 
Cocoa
functionality (to do with bundles) so they are unsupported.  Don't you get an 
error
message each time you try to start MacVim with a softlink?  I've added such a 
message
so if you don't get it I'd like to know exactly what you symlinked to so that I 
may
fix the missing error message.  On my machine it looks like this when I try to 
start
via a symlink (to MacVim.app/Contents/MacOS/Vim):

ERROR: Failed to load dictionaries.

    Most likely this is because you have symlinked directly to
    the Vim binary, which Cocoa does not allow.  Please use an
    alias or the mvim shell script instead.  If you have not used
    a symlink, then your MacVim.app bundle is incomplete.

The help covers all you need to know about how to start MacVim, check out:

  :h macvim-start

(and ":h mvim" as you've already suggested yourself.)

Original comment by bjorn.winckler@gmail.com on 10 Oct 2008 at 5:48

GoogleCodeExporter commented 9 years ago
Super. I guess the issue can be closed now.
Thanks again.

Original comment by eugu...@gmail.com on 10 Oct 2008 at 5:59

GoogleCodeExporter commented 9 years ago

Original comment by bjorn.winckler@gmail.com on 10 Oct 2008 at 7:38