a question

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

a question

linda.s
I have both vim and gvim app under my applications in the Mac. Both work fine.
I typed vim in the terminal and it successfully went yo VIM interface.
However, if I typed gvim, there came an error message "-bash: gvim:
command not found". If I want to launch gvim from the terminal, what
to do
Reply | Threaded
Open this post in threaded view
|

Re: a question

panshizhu
linda.s <[hidden email]> wrote on 2006.04.13 16:02:44:

> I have both vim and gvim app under my applications in the Mac. Both work
fine.
> I typed vim in the terminal and it successfully went yo VIM interface.
> However, if I typed gvim, there came an error message "-bash: gvim:
> command not found". If I want to launch gvim from the terminal, what
> to do


try: vim -g

HTH.
--
Sincerely
Pan, Shizhu. ext: 2221

Reply | Threaded
Open this post in threaded view
|

Re: a question

linda.s
On 4/13/06, [hidden email] <[hidden email]> wrote:

> linda.s <[hidden email]> wrote on 2006.04.13 16:02:44:
>
> > I have both vim and gvim app under my applications in the Mac. Both work
> fine.
> > I typed vim in the terminal and it successfully went yo VIM interface.
> > However, if I typed gvim, there came an error message "-bash: gvim:
> > command not found". If I want to launch gvim from the terminal, what
> > to do
>
>
> try: vim -g
>
vim -g
E25: GUI cannot be used: Not enabled at compile time
Reply | Threaded
Open this post in threaded view
|

execute macro on pattern

Zbigniew Kowalski
dear vimmers,

i have some macros defined, ie some registers (a, i, d, etc) contain commands. i execute them via @a, @m, and so.
how to execute a particular macro for every line that matches a pattern?

Something like:
: g/<pattern1>/<macro a>
: g/<pattern2>/<macro b>
: g/<pattern2>/<macro g>

i'm using vim 6.4.

thank you for your help

best regards
zbigniew kowalski



Reply | Threaded
Open this post in threaded view
|

Re: execute macro on pattern

Jürgen Krämer

Hi,

Zbigniew Kowalski wrote:
>
> i have some macros defined, ie some registers (a, i, d, etc) contain commands. i execute them via @a, @m, and so.
> how to execute a particular macro for every line that matches a pattern?
>
> Something like:
> : g/<pattern1>/<macro a>
> : g/<pattern2>/<macro b>
> : g/<pattern2>/<macro g>

  :g/<pattern1>/normal @a
  :g/<pattern2>/normal @b
  :g/<pattern2>/normal @c

Regards,
Jürgen

--
Jürgen Krämer                              Softwareentwicklung
HABEL GmbH & Co. KG                        mailto:[hidden email]
Hinteres Öschle 2                          Tel: +49 / 74 61 / 93 53 - 15
78604 Rietheim-Weilheim                    Fax: +49 / 74 61 / 93 53 - 99
Reply | Threaded
Open this post in threaded view
|

Re: a question

Jeremy Conlin
In reply to this post by linda.s
On 4/13/06, linda. s <[hidden email]> wrote:

> On 4/13/06, [hidden email] <[hidden email]> wrote:
> > linda.s <[hidden email]> wrote on 2006.04.13 16:02:44:
> >
> > > I have both vim and gvim app under my applications in the Mac. Both work
> > fine.
> > > I typed vim in the terminal and it successfully went yo VIM interface.
> > > However, if I typed gvim, there came an error message "-bash: gvim:
> > > command not found". If I want to launch gvim from the terminal, what
> > > to do
> >
> >
> > try: vim -g
> >
> vim -g
> E25: GUI cannot be used: Not enabled at compile time
>

Traditionally, on a mac, if you want to open an application from the
terminal you can do so as

open -a Vim

This assumes your application is in one of the "regular" locations
such as /Applications or /Applications/Utilities.  If your gvim is in
Applications the above command should work.  You can also pass a
filename to it if you want to open a particular file such as

open -a Vim myfilename

Hope this helps.
Jeremy
Reply | Threaded
Open this post in threaded view
|

starting vim from Mac OS X command line (was: a question)

Benji Fisher
In reply to this post by linda.s
On Thu, Apr 13, 2006 at 04:48:22AM -0700, linda.s wrote:

> On 4/13/06, [hidden email] <[hidden email]> wrote:
> > linda.s <[hidden email]> wrote on 2006.04.13 16:02:44:
> >
> > > I have both vim and gvim app under my applications in the Mac. Both work
> > fine.
> > > I typed vim in the terminal and it successfully went yo VIM interface.
> > > However, if I typed gvim, there came an error message "-bash: gvim:
> > > command not found". If I want to launch gvim from the terminal, what
> > > to do
> >
> > try: vim -g
> >
> vim -g
> E25: GUI cannot be used: Not enabled at compile time

     This is probably the version of vim installed with the OS.  To
confirm:

$ which vim
$ vim --version

If I am right, the first will tell you /usr/bin/vim and the second will
show (among other things) that it is vim 6.2 (Normal version without
GUI).

     There are several ways to start Vim.app from the command line.  See
http://macvim.org/OSX/index.php#FAQ
I suggest using the gvim shell script (included with the binaries from
macvim.org or separately as http://macvim.org/OSX/files/gvim ) .  If you
do not already have a personal bin/ directory, then do something like
this:

$ mkdir ~/bin
$ cd ~/bin
$ curl -O http://macvim.org/OSX/files/gvim
$ ln gvim vim
$ ./vim ~/.bashrc

and add a line or two to your .bashrc file (assuming you use bash)
something like this:

# Add my own stuff to the path:
export PATH=~/bin:$PATH

If you keep Vim.app somewhere unusual, see the comments in the shell
script.  (The $ curl line is one way to get the gvim shell script from
macvim.org ; if you already have a local copy, you can use that.)

HTH --Benji Fisher
Reply | Threaded
Open this post in threaded view
|

Re: a question

panshizhu
In reply to this post by linda.s
linda.s <[hidden email]> wrote on 2006.04.13 19:48:22:

> On 4/13/06, [hidden email] <[hidden email]> wrote:
> > linda.s <[hidden email]> wrote on 2006.04.13 16:02:44:
> >
> > > I have both vim and gvim app under my applications in the Mac. Both
work
> > fine.
> > > I typed vim in the terminal and it successfully went yo VIM
interface.
> > > However, if I typed gvim, there came an error message "-bash: gvim:
> > > command not found". If I want to launch gvim from the terminal, what
> > > to do
> >
> >
> > try: vim -g
> >
> vim -g
> E25: GUI cannot be used: Not enabled at compile time

Then IMO it's a good idea to re-compile the vim to have GUI-support.

--
Sincerely
Pan, Shizhu. ext: 2221

Reply | Threaded
Open this post in threaded view
|

Re: a question

Benji Fisher
On Fri, Apr 14, 2006 at 08:39:29AM +0800, [hidden email] wrote:

> linda.s <[hidden email]> wrote on 2006.04.13 19:48:22:
>
> > On 4/13/06, [hidden email] <[hidden email]> wrote:
> > > linda.s <[hidden email]> wrote on 2006.04.13 16:02:44:
> > >
> > > > I have both vim and gvim app under my applications in the Mac.
> > > > Both work fine.  I typed vim in the terminal and it successfully
> > > > went yo VIM interface.  However, if I typed gvim, there came an
> > > > error message "-bash: gvim: command not found". If I want to
> > > > launch gvim from the terminal, what to do
> > >
> > > try: vim -g
> > >
> > vim -g
> > E25: GUI cannot be used: Not enabled at compile time
>
> Then IMO it's a good idea to re-compile the vim to have GUI-support.

     That is not necessary:  the OP already mentioned that she has "vim
and gvim app," meaning (I think) Vim.app and gvim.app .  The problem is
which vim (pun intended) is invoked.  Perhaps you missed my previous
note on this thread since I changed the subject line.

HTH --Benji Fisher