Problem running gvim from command line in OS X Tiger

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem running gvim from command line in OS X Tiger

Unnsse Khan-2
Hello again,

I was forced to re-install OS X Tiger, after, an unexpected  
mishap... :-)

For some reason or another everything seems intact (my .gvimrc  
and .vimrc files are still present), but when I try to type "gvim"  
from the command line, I receive an error message...

This is the contents of my .gvimrc file:

Raven:~ untz$ cat .gvimrc
set nocompatible
set backspace=indent,eol,start
set ts=4
set keymodel=startsel
set nu
set autoindent
set ruler
syntax on
colorscheme torte
set gfn=Anonymous:h12
set anti
imap <D-Z> u
imap <D-z> <C-O>u

This is the contents of my .vimrc file:

Raven:~ untz$ cat .vimrc
set nocompatible
set ts=4
set keymodel=startsel
set nu
set autoindent
set ruler
set backspace=indent,eol,start
syntax on
colorscheme torte
set gfn=Anonymous:h12
imap <D-Z> u
imap <D-z> <C-O>u

This is the contents of my .profile file:

Raven:~ untz$ cat .profile
alias vim="/Applications/Vim.app/Contents/MacOS/Vim"
alias gvim="/Applications/Vim.app/Contents/MacOS/Vim -g"
test -r /sw/bin/init.sh && . /sw/bin/init.sh

This is the contents of my .bash_profile:

Raven:~ untz$ cat .bash_profile
JAVA_HOME="/System/Library/frameworks/JavaVM.framework/Versions/1.5.0/
Home";
J2EE_HOME="/Developer/JavaTools/j2sdkee1.3.1";
J2ME_HOME="/Developer/JavaTools/j2me_wireless_toolkit2.2";
CATALINA_HOME="/Developer/JavaTools/tomcat/jakarta-tomcat-5.5.9";
CLASSPATH=.:"$J2EE_HOME/lib/j2ee.jar":"$CATALINA_HOME/common/lib/
servlet-api.jar":"$CATALINA_HOME/common/lib/jsp-api.jar":"/Developer/
Database/hsqldb/lib/hsqldb.jar";
PATH=$PATH:$JAVA_HOME/bin:$J2EE_HOME/bin:$J2ME_HOME/bin:/usr/local/
bin:/opt/local/bin;
VIMRUNTIME="/Applications/Vim.app/runtime";
export JAVA_HOME J2ME_HOME J2EE_HOME CATALINA_HOME PATH VIMRUNTIME bash

When I try to launch gvim by typing in "gvim" from the command line,  
this is what I get:

Raven:~ untz$ gvim Hello.cpp
-bash: gvim: command not found
Raven:~ untz$

I am using gvim 7.0aa ALPHA from http://macvim.org/

Any advice, suggestions, and tips will be greatly appreciated...

Many, many, thanks!

-Unnsse







Reply | Threaded
Open this post in threaded view
|

Re: Problem running gvim from command line in OS X Tiger

A.J.Mechelynck
----- Original Message -----
From: "Unnsse Khan" <[hidden email]>
To: <[hidden email]>
Cc: <[hidden email]>
Sent: Thursday, September 22, 2005 8:07 AM
Subject: Problem running gvim from command line in OS X Tiger


> Hello again,
>
> I was forced to re-install OS X Tiger, after, an unexpected  mishap... :-)
>
> For some reason or another everything seems intact (my .gvimrc  and .vimrc
> files are still present), but when I try to type "gvim"  from the command
> line, I receive an error message...
>
> This is the contents of my .gvimrc file:
[...]
> This is the contents of my .vimrc file:
[...]

> This is the contents of my .profile file:
>
> Raven:~ untz$ cat .profile
> alias vim="/Applications/Vim.app/Contents/MacOS/Vim"
> alias gvim="/Applications/Vim.app/Contents/MacOS/Vim -g"
> test -r /sw/bin/init.sh && . /sw/bin/init.sh
>
> This is the contents of my .bash_profile:
>
> Raven:~ untz$ cat .bash_profile
> JAVA_HOME="/System/Library/frameworks/JavaVM.framework/Versions/1.5.0/
> Home";
> J2EE_HOME="/Developer/JavaTools/j2sdkee1.3.1";
> J2ME_HOME="/Developer/JavaTools/j2me_wireless_toolkit2.2";
> CATALINA_HOME="/Developer/JavaTools/tomcat/jakarta-tomcat-5.5.9";
> CLASSPATH=.:"$J2EE_HOME/lib/j2ee.jar":"$CATALINA_HOME/common/lib/
> servlet-api.jar":"$CATALINA_HOME/common/lib/jsp-api.jar":"/Developer/
> Database/hsqldb/lib/hsqldb.jar";
> PATH=$PATH:$JAVA_HOME/bin:$J2EE_HOME/bin:$J2ME_HOME/bin:/usr/local/
> bin:/opt/local/bin;
> VIMRUNTIME="/Applications/Vim.app/runtime";
> export JAVA_HOME J2ME_HOME J2EE_HOME CATALINA_HOME PATH VIMRUNTIME bash
>
> When I try to launch gvim by typing in "gvim" from the command line,  this
> is what I get:
>
> Raven:~ untz$ gvim Hello.cpp
> -bash: gvim: command not found
> Raven:~ untz$
>
> I am using gvim 7.0aa ALPHA from http://macvim.org/
>
> Any advice, suggestions, and tips will be greatly appreciated...
>
> Many, many, thanks!
>
> -Unnsse

Are you sure your .profile was read? Type "alias" at the bash command-line
to check it. You should still be able to run gvim by invoking it as
"/Applications/Vim.app/Contents/MacOS/Vim -g" (without the quotes) or as
gvim after using "source ~/.profile" in bash.

Best regards,
Tony.


Reply | Threaded
Open this post in threaded view
|

RE: Problem running gvim from command line in OS X Tiger

Zdenek Sekera
In reply to this post by Unnsse Khan-2
> -----Original Message-----
> From: Tony Mechelynck [mailto:[hidden email]]
> Sent: 22 September 2005 14:30
> To: Unnsse Khan; [hidden email]
> Cc: [hidden email]
> Subject: Re: Problem running gvim from command line in OS X Tiger
>
> ----- Original Message -----
> From: "Unnsse Khan" <[hidden email]>
> To: <[hidden email]>
> Cc: <[hidden email]>
> Sent: Thursday, September 22, 2005 8:07 AM
> Subject: Problem running gvim from command line in OS X Tiger
>
>
> > Hello again,
> >
> > I was forced to re-install OS X Tiger, after, an unexpected
>  mishap... :-)
> >
> > For some reason or another everything seems intact (my
> .gvimrc  and .vimrc
> > files are still present), but when I try to type "gvim"  
> from the command
> > line, I receive an error message...
> >
> > This is the contents of my .gvimrc file:
> [...]
> > This is the contents of my .vimrc file:
> [...]
> > This is the contents of my .profile file:
> >
> > Raven:~ untz$ cat .profile
> > alias vim="/Applications/Vim.app/Contents/MacOS/Vim"
> > alias gvim="/Applications/Vim.app/Contents/MacOS/Vim -g"
> > test -r /sw/bin/init.sh && . /sw/bin/init.sh
> >
> > This is the contents of my .bash_profile:
> >
> > Raven:~ untz$ cat .bash_profile
> >
> JAVA_HOME="/System/Library/frameworks/JavaVM.framework/Version
> s/1.5.0/
> > Home";
> > J2EE_HOME="/Developer/JavaTools/j2sdkee1.3.1";
> > J2ME_HOME="/Developer/JavaTools/j2me_wireless_toolkit2.2";
> > CATALINA_HOME="/Developer/JavaTools/tomcat/jakarta-tomcat-5.5.9";
> > CLASSPATH=.:"$J2EE_HOME/lib/j2ee.jar":"$CATALINA_HOME/common/lib/
> >
> servlet-api.jar":"$CATALINA_HOME/common/lib/jsp-api.jar":"/Developer/
> > Database/hsqldb/lib/hsqldb.jar";
> > PATH=$PATH:$JAVA_HOME/bin:$J2EE_HOME/bin:$J2ME_HOME/bin:/usr/local/
> > bin:/opt/local/bin;
> > VIMRUNTIME="/Applications/Vim.app/runtime";
> > export JAVA_HOME J2ME_HOME J2EE_HOME CATALINA_HOME PATH
> VIMRUNTIME bash
> >
> > When I try to launch gvim by typing in "gvim" from the
> command line,  this
> > is what I get:
> >
> > Raven:~ untz$ gvim Hello.cpp
> > -bash: gvim: command not found
> > Raven:~ untz$
> >
> > I am using gvim 7.0aa ALPHA from http://macvim.org/
> >
> > Any advice, suggestions, and tips will be greatly appreciated...
> >
> > Many, many, thanks!
> >
> > -Unnsse
>
> Are you sure your .profile was read? Type "alias" at the bash
> command-line
> to check it. You should still be able to run gvim by invoking it as
> "/Applications/Vim.app/Contents/MacOS/Vim -g" (without the
> quotes) or as
> gvim after using "source ~/.profile" in bash.

Well, couldn't it simply be that simply he *does not*
have gvim installed *or* it is not in his PATH?

---Zdenek
Reply | Threaded
Open this post in threaded view
|

Re: Problem running gvim from command line in OS X Tiger

Tim Chase-2
> Well, couldn't it simply be that simply he *does not*
> have gvim installed *or* it is not in his PATH?

If it's installed, it doesn't seem to be in his PATH.  To find
gvim, it's pretty easy to just do

        find / -name gvim

and see what turns up.  If it returns results, then it's likely
installed, but not in the path.  If nothing comes back, then he's
likely just got vim, not gvim.

-tim



Reply | Threaded
Open this post in threaded view
|

Re: Problem running gvim from command line in OS X Tiger

A.J.Mechelynck
In reply to this post by Zdenek Sekera
----- Original Message -----
From: "Zdenek Sekera" <[hidden email]>
To: "Tony Mechelynck" <[hidden email]>; "Unnsse Khan"
<[hidden email]>; <[hidden email]>
Cc: <[hidden email]>
Sent: Thursday, September 22, 2005 2:35 PM
Subject: RE: Problem running gvim from command line in OS X Tiger


>> -----Original Message-----
>> From: Tony Mechelynck [mailto:[hidden email]]
>> Sent: 22 September 2005 14:30
>> To: Unnsse Khan; [hidden email]
>> Cc: [hidden email]
>> Subject: Re: Problem running gvim from command line in OS X Tiger
>>
>> ----- Original Message -----
>> From: "Unnsse Khan" <[hidden email]>
>> To: <[hidden email]>
>> Cc: <[hidden email]>
>> Sent: Thursday, September 22, 2005 8:07 AM
>> Subject: Problem running gvim from command line in OS X Tiger
>>
>>
>> > Hello again,
>> >
>> > I was forced to re-install OS X Tiger, after, an unexpected
>>  mishap... :-)
>> >
>> > For some reason or another everything seems intact (my
>> .gvimrc  and .vimrc
>> > files are still present), but when I try to type "gvim"
>> from the command
>> > line, I receive an error message...
>> >
>> > This is the contents of my .gvimrc file:
>> [...]
>> > This is the contents of my .vimrc file:
>> [...]
>> > This is the contents of my .profile file:
>> >
>> > Raven:~ untz$ cat .profile
>> > alias vim="/Applications/Vim.app/Contents/MacOS/Vim"
>> > alias gvim="/Applications/Vim.app/Contents/MacOS/Vim -g"
>> > test -r /sw/bin/init.sh && . /sw/bin/init.sh
>> >
>> > This is the contents of my .bash_profile:
>> >
>> > Raven:~ untz$ cat .bash_profile
>> >
>> JAVA_HOME="/System/Library/frameworks/JavaVM.framework/Version
>> s/1.5.0/
>> > Home";
>> > J2EE_HOME="/Developer/JavaTools/j2sdkee1.3.1";
>> > J2ME_HOME="/Developer/JavaTools/j2me_wireless_toolkit2.2";
>> > CATALINA_HOME="/Developer/JavaTools/tomcat/jakarta-tomcat-5.5.9";
>> > CLASSPATH=.:"$J2EE_HOME/lib/j2ee.jar":"$CATALINA_HOME/common/lib/
>> >
>> servlet-api.jar":"$CATALINA_HOME/common/lib/jsp-api.jar":"/Developer/
>> > Database/hsqldb/lib/hsqldb.jar";
>> > PATH=$PATH:$JAVA_HOME/bin:$J2EE_HOME/bin:$J2ME_HOME/bin:/usr/local/
>> > bin:/opt/local/bin;
>> > VIMRUNTIME="/Applications/Vim.app/runtime";
>> > export JAVA_HOME J2ME_HOME J2EE_HOME CATALINA_HOME PATH
>> VIMRUNTIME bash
>> >
>> > When I try to launch gvim by typing in "gvim" from the
>> command line,  this
>> > is what I get:
>> >
>> > Raven:~ untz$ gvim Hello.cpp
>> > -bash: gvim: command not found
>> > Raven:~ untz$
>> >
>> > I am using gvim 7.0aa ALPHA from http://macvim.org/
>> >
>> > Any advice, suggestions, and tips will be greatly appreciated...
>> >
>> > Many, many, thanks!
>> >
>> > -Unnsse
>>
>> Are you sure your .profile was read? Type "alias" at the bash
>> command-line
>> to check it. You should still be able to run gvim by invoking it as
>> "/Applications/Vim.app/Contents/MacOS/Vim -g" (without the
>> quotes) or as
>> gvim after using "source ~/.profile" in bash.
>
> Well, couldn't it simply be that simply he *does not*
> have gvim installed *or* it is not in his PATH?
>
> ---Zdenek

His .profile creates a shell alias for gvim, defining it as vim -g with a
full path. However his shell doesn't know about gvim. Therefore the alias
seems not to have been created.


Best regards,
Tony.


Reply | Threaded
Open this post in threaded view
|

Re: Problem running gvim from command line in OS X Tiger

Unnsse Khan-2
In reply to this post by Unnsse Khan-2
Stephen Reihm's suggestion worked... Thanks! :)

I placed the . ~/.profile in the first line of my .bash_profile.

For some reason, or another, my font sizes are super small...

I even increased it 14 (in my .gvimrc and .vimrc) and it still didn't  
do anything.

My .gvimrc:

Last login: Thu Sep 22 15:16:31 on ttyp1
Welcome to Darwin!
Raven:~ untz$ cat .gvimrc
set nocompatible
set backspace=indent,eol,start
set ts=4
set keymodel=startsel
set nu
set autoindent
set ruler
syntax on
colorscheme torte
set gfn=Anonymous:h14
set anti
imap <D-Z> u
imap <D-z> <C-O>u
Raven:~ untz$

My .vimrc:

set nocompatible
set ts=4
set keymodel=startsel
set nu
set autoindent
set ruler
set backspace=indent,eol,start
syntax on
colorscheme torte
set gfn=Anonymous:h14
imap <D-Z> u
imap <D-z> <C-O>u

Any help, suggestions, and / or tips are greatly appreciated...

Kindest regards,

Unnsse

On Sep 22, 2005, at 12:21 AM, Stephen Riehm wrote:

> now you've determines that you DON'T have a working alias for gvim,  
> and gvim is not in your path.
>
> In your original post you showed that you have a .profile and  
> a .bash_profile
> The gvim alias was only in .profile.
> Either copy the alias to your .bash_profile or 'source' .profile as  
> the first thing from within your .bash_profile
> Like this:
>
> .bash_profile:
>     . ~/.profile
>
> Start a new shell and it should work.
>
> Steve
>
>
> On 22.09.2005, at 09:00, Unnsse Khan wrote:
>
>
>> Stephen,
>>
>> Hi there! This is what happened when I followed your suggestions...
>>
>> Last login: Wed Sep 21 23:48:59 on console
>> Welcome to Darwin!
>> Raven:~ untz$ which gvim
>> no gvim in /bin /sbin /usr/bin /usr/sbin /System/Library/
>> frameworks/JavaVM.framework/Versions/1.5.0/Home/bin /Developer/
>> JavaTools/j2sdkee1.3.1/bin /Developer/JavaTools/
>> j2me_wireless_toolkit2.2/bin /usr/local/bin /opt/local/bin
>> Raven:~ untz$ type gvim
>> -bash: type: gvim: not found
>> Raven:~ untz$ alias gvim
>> -bash: alias: gvim: not found
>> Raven:~ untz$
>>
>> What should I do from here?
>>
>> Kindest regards,
>>
>> Unnsse
>>
>> On Sep 21, 2005, at 11:46 PM, Stephen Riehm wrote:
>>
>>
>>
>>> try the commands:
>>>
>>>     which gvim
>>>     type gvim
>>>     alias gvim
>>>
>>> on the command line, and see what path's it gives you.
>>> Then use ls to see if those path's actually point to a vim binary.
>>>
>>> It sounds like you might be using the wrong shell (ie: not bash)  
>>> in which case your .profile isn't being used, OR your vim binary  
>>> isn't where you expect it to be.
>>>
>>> Cheers,
>>>
>>> Steve
>>>
>>> On 22.09.2005, at 08:07, Unnsse Khan wrote:
>>>
>>>
>>>
>>>
>>>> Hello again,
>>>>
>>>> I was forced to re-install OS X Tiger, after, an unexpected  
>>>> mishap... :-)
>>>>
>>>> For some reason or another everything seems intact (my .gvimrc  
>>>> and .vimrc files are still present), but when I try to type  
>>>> "gvim" from the command line, I receive an error message...
>>>>
>>>> This is the contents of my .gvimrc file:
>>>>
>>>> Raven:~ untz$ cat .gvimrc
>>>> set nocompatible
>>>> set backspace=indent,eol,start
>>>> set ts=4
>>>> set keymodel=startsel
>>>> set nu
>>>> set autoindent
>>>> set ruler
>>>> syntax on
>>>> colorscheme torte
>>>> set gfn=Anonymous:h12
>>>> set anti
>>>> imap <D-Z> u
>>>> imap <D-z> <C-O>u
>>>>
>>>> This is the contents of my .vimrc file:
>>>>
>>>> Raven:~ untz$ cat .vimrc
>>>> set nocompatible
>>>> set ts=4
>>>> set keymodel=startsel
>>>> set nu
>>>> set autoindent
>>>> set ruler
>>>> set backspace=indent,eol,start
>>>> syntax on
>>>> colorscheme torte
>>>> set gfn=Anonymous:h12
>>>> imap <D-Z> u
>>>> imap <D-z> <C-O>u
>>>>
>>>> This is the contents of my .profile file:
>>>>
>>>> Raven:~ untz$ cat .profile
>>>> alias vim="/Applications/Vim.app/Contents/MacOS/Vim"
>>>> alias gvim="/Applications/Vim.app/Contents/MacOS/Vim -g"
>>>> test -r /sw/bin/init.sh && . /sw/bin/init.sh
>>>>
>>>> This is the contents of my .bash_profile:
>>>>
>>>> Raven:~ untz$ cat .bash_profile
>>>> JAVA_HOME="/System/Library/frameworks/JavaVM.framework/Versions/
>>>> 1.5.0/Home";
>>>> J2EE_HOME="/Developer/JavaTools/j2sdkee1.3.1";
>>>> J2ME_HOME="/Developer/JavaTools/j2me_wireless_toolkit2.2";
>>>> CATALINA_HOME="/Developer/JavaTools/tomcat/jakarta-tomcat-5.5.9";
>>>> CLASSPATH=.:"$J2EE_HOME/lib/j2ee.jar":"$CATALINA_HOME/common/lib/
>>>> servlet-api.jar":"$CATALINA_HOME/common/lib/jsp-api.jar":"/
>>>> Developer/Database/hsqldb/lib/hsqldb.jar";
>>>> PATH=$PATH:$JAVA_HOME/bin:$J2EE_HOME/bin:$J2ME_HOME/bin:/usr/
>>>> local/bin:/opt/local/bin;
>>>> VIMRUNTIME="/Applications/Vim.app/runtime";
>>>> export JAVA_HOME J2ME_HOME J2EE_HOME CATALINA_HOME PATH  
>>>> VIMRUNTIME bash
>>>>
>>>> When I try to launch gvim by typing in "gvim" from the command  
>>>> line, this is what I get:
>>>>
>>>> Raven:~ untz$ gvim Hello.cpp
>>>> -bash: gvim: command not found
>>>> Raven:~ untz$
>>>>
>>>> I am using gvim 7.0aa ALPHA from http://macvim.org/
>>>>
>>>> Any advice, suggestions, and tips will be greatly appreciated...
>>>>
>>>> Many, many, thanks!
>>>>
>>>> -Unnsse
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>>
>>
>>
>>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Problem running gvim from command line in OS X Tiger

Unnsse Khan-2
Ok... I fixed it. All I had to do was reinstall AnonymousTT in FontBook.

Kindest regards,

Unnsse

On Sep 22, 2005, at 3:22 PM, Unnsse Khan wrote:

> Stephen Reihm's suggestion worked... Thanks! :)
>
> I placed the . ~/.profile in the first line of my .bash_profile.
>
> For some reason, or another, my font sizes are super small...
>
> I even increased it 14 (in my .gvimrc and .vimrc) and it still  
> didn't do anything.
>
> My .gvimrc:
>
> Last login: Thu Sep 22 15:16:31 on ttyp1
> Welcome to Darwin!
> Raven:~ untz$ cat .gvimrc
> set nocompatible
> set backspace=indent,eol,start
> set ts=4
> set keymodel=startsel
> set nu
> set autoindent
> set ruler
> syntax on
> colorscheme torte
> set gfn=Anonymous:h14
> set anti
> imap <D-Z> u
> imap <D-z> <C-O>u
> Raven:~ untz$
>
> My .vimrc:
>
> set nocompatible
> set ts=4
> set keymodel=startsel
> set nu
> set autoindent
> set ruler
> set backspace=indent,eol,start
> syntax on
> colorscheme torte
> set gfn=Anonymous:h14
> imap <D-Z> u
> imap <D-z> <C-O>u
>
> Any help, suggestions, and / or tips are greatly appreciated...
>
> Kindest regards,
>
> Unnsse
>
> On Sep 22, 2005, at 12:21 AM, Stephen Riehm wrote:
>
>
>> now you've determines that you DON'T have a working alias for  
>> gvim, and gvim is not in your path.
>>
>> In your original post you showed that you have a .profile and  
>> a .bash_profile
>> The gvim alias was only in .profile.
>> Either copy the alias to your .bash_profile or 'source' .profile  
>> as the first thing from within your .bash_profile
>> Like this:
>>
>> .bash_profile:
>>     . ~/.profile
>>
>> Start a new shell and it should work.
>>
>> Steve
>>
>>
>> On 22.09.2005, at 09:00, Unnsse Khan wrote:
>>
>>
>>
>>> Stephen,
>>>
>>> Hi there! This is what happened when I followed your suggestions...
>>>
>>> Last login: Wed Sep 21 23:48:59 on console
>>> Welcome to Darwin!
>>> Raven:~ untz$ which gvim
>>> no gvim in /bin /sbin /usr/bin /usr/sbin /System/Library/
>>> frameworks/JavaVM.framework/Versions/1.5.0/Home/bin /Developer/
>>> JavaTools/j2sdkee1.3.1/bin /Developer/JavaTools/
>>> j2me_wireless_toolkit2.2/bin /usr/local/bin /opt/local/bin
>>> Raven:~ untz$ type gvim
>>> -bash: type: gvim: not found
>>> Raven:~ untz$ alias gvim
>>> -bash: alias: gvim: not found
>>> Raven:~ untz$
>>>
>>> What should I do from here?
>>>
>>> Kindest regards,
>>>
>>> Unnsse
>>>
>>> On Sep 21, 2005, at 11:46 PM, Stephen Riehm wrote:
>>>
>>>
>>>
>>>
>>>> try the commands:
>>>>
>>>>     which gvim
>>>>     type gvim
>>>>     alias gvim
>>>>
>>>> on the command line, and see what path's it gives you.
>>>> Then use ls to see if those path's actually point to a vim binary.
>>>>
>>>> It sounds like you might be using the wrong shell (ie: not bash)  
>>>> in which case your .profile isn't being used, OR your vim binary  
>>>> isn't where you expect it to be.
>>>>
>>>> Cheers,
>>>>
>>>> Steve
>>>>
>>>> On 22.09.2005, at 08:07, Unnsse Khan wrote:
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>> Hello again,
>>>>>
>>>>> I was forced to re-install OS X Tiger, after, an unexpected  
>>>>> mishap... :-)
>>>>>
>>>>> For some reason or another everything seems intact (my .gvimrc  
>>>>> and .vimrc files are still present), but when I try to type  
>>>>> "gvim" from the command line, I receive an error message...
>>>>>
>>>>> This is the contents of my .gvimrc file:
>>>>>
>>>>> Raven:~ untz$ cat .gvimrc
>>>>> set nocompatible
>>>>> set backspace=indent,eol,start
>>>>> set ts=4
>>>>> set keymodel=startsel
>>>>> set nu
>>>>> set autoindent
>>>>> set ruler
>>>>> syntax on
>>>>> colorscheme torte
>>>>> set gfn=Anonymous:h12
>>>>> set anti
>>>>> imap <D-Z> u
>>>>> imap <D-z> <C-O>u
>>>>>
>>>>> This is the contents of my .vimrc file:
>>>>>
>>>>> Raven:~ untz$ cat .vimrc
>>>>> set nocompatible
>>>>> set ts=4
>>>>> set keymodel=startsel
>>>>> set nu
>>>>> set autoindent
>>>>> set ruler
>>>>> set backspace=indent,eol,start
>>>>> syntax on
>>>>> colorscheme torte
>>>>> set gfn=Anonymous:h12
>>>>> imap <D-Z> u
>>>>> imap <D-z> <C-O>u
>>>>>
>>>>> This is the contents of my .profile file:
>>>>>
>>>>> Raven:~ untz$ cat .profile
>>>>> alias vim="/Applications/Vim.app/Contents/MacOS/Vim"
>>>>> alias gvim="/Applications/Vim.app/Contents/MacOS/Vim -g"
>>>>> test -r /sw/bin/init.sh && . /sw/bin/init.sh
>>>>>
>>>>> This is the contents of my .bash_profile:
>>>>>
>>>>> Raven:~ untz$ cat .bash_profile
>>>>> JAVA_HOME="/System/Library/frameworks/JavaVM.framework/Versions/
>>>>> 1.5.0/Home";
>>>>> J2EE_HOME="/Developer/JavaTools/j2sdkee1.3.1";
>>>>> J2ME_HOME="/Developer/JavaTools/j2me_wireless_toolkit2.2";
>>>>> CATALINA_HOME="/Developer/JavaTools/tomcat/jakarta-tomcat-5.5.9";
>>>>> CLASSPATH=.:"$J2EE_HOME/lib/j2ee.jar":"$CATALINA_HOME/common/
>>>>> lib/servlet-api.jar":"$CATALINA_HOME/common/lib/jsp-api.jar":"/
>>>>> Developer/Database/hsqldb/lib/hsqldb.jar";
>>>>> PATH=$PATH:$JAVA_HOME/bin:$J2EE_HOME/bin:$J2ME_HOME/bin:/usr/
>>>>> local/bin:/opt/local/bin;
>>>>> VIMRUNTIME="/Applications/Vim.app/runtime";
>>>>> export JAVA_HOME J2ME_HOME J2EE_HOME CATALINA_HOME PATH  
>>>>> VIMRUNTIME bash
>>>>>
>>>>> When I try to launch gvim by typing in "gvim" from the command  
>>>>> line, this is what I get:
>>>>>
>>>>> Raven:~ untz$ gvim Hello.cpp
>>>>> -bash: gvim: command not found
>>>>> Raven:~ untz$
>>>>>
>>>>> I am using gvim 7.0aa ALPHA from http://macvim.org/
>>>>>
>>>>> Any advice, suggestions, and tips will be greatly appreciated...
>>>>>
>>>>> Many, many, thanks!
>>>>>
>>>>> -Unnsse
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>>
>>
>>
>>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Problem running gvim from command line in OS X Tiger

A.J.Mechelynck
In reply to this post by Unnsse Khan-2
----- Original Message -----
From: "Unnsse Khan" <[hidden email]>
To: <[hidden email]>
Cc: <[hidden email]>
Sent: Friday, September 23, 2005 12:22 AM
Subject: Re: Problem running gvim from command line in OS X Tiger


> Stephen Reihm's suggestion worked... Thanks! :)
>
> I placed the . ~/.profile in the first line of my .bash_profile.
>
> For some reason, or another, my font sizes are super small...
>
> I even increased it 14 (in my .gvimrc and .vimrc) and it still didn't  do
> anything.

The 'guifont' you list is for non-X11 systems. You are not saying if your
GUI interface is for X11 (and which flavour), or for Classical Mac GUI (or
maybe you are but I'm not getting it). Try adding the following snippet (or
something similar) to your vimrc:

    if has("gui_running")
        if has("gui_gtk2")
            set guifont=Courier\ New\ 14
        elseif has("gui_kde")
            set guifont=Courier\ New/14
        elseif has("x11")
            set guifont=-*-courier-medium-r-normal-*-*-280-*-*-m-*-*
        else
            set guifont=Courier_New:h14:cDEFAULT
        endif
        set guifont?
    endif

Once it can be set successfully, even to something not totally to your
liking, use

    set guifont=<Tab>

(assuming 'compatible' is set). The current value will be filled-in on the
command-line, with escaping backslashes if and where needed (the numeric
part is the size). Edit the value, hit Enter to accept the changes or Esc to
abandon the changes; and when you have something that works _and_ is to your
liking you can set it in your vimrc.

In some (but not all) versions of gvim you can also use

    set guifont=*

to select your font from a menu.

See also http://vim.sourceforge.net/tips/tip.php?tip_id=632


Best regards,
Tony.