Loading ...
Sorry, an error occurred while loading the content.
 

Re: Calling vim from command line bash - Not directly vim related

Expand Messages
  • Thomas Adam
    Glad I could help :) -- Thomas Adam ... ===== Thomas Adam The Linux Weekend Mechanic -- www.linuxgazette.com
    Message 1 of 4 , Jun 23, 2003
      Glad I could help :)

      -- Thomas Adam


      --- "Juan M. Medina" <juanmanuelmedina@...> wrote: > Hi!
      >
      > Thanks for your idea. I already had tried a variable but could not find
      > a
      > way to make it work.
      >
      > Here is the working alias:
      > -----------------------------------------
      > export SQSHEDITOR="/usr/bin/vim -u ~/_sqshvimrc"
      >
      > alias sqlserver='sqsh -S sqlserver -U myuser -P mypassword -D mydatabase
      > -w
      > 99999 -E \$SQSHEDITOR'
      >
      > -----------------------------------------
      > I tried all kinds of quoting without the variable to no avail. However
      > your
      > proposed solution worked fine.
      >
      > Thanks for your help.
      >
      > Best Regards,
      >
      > JUAN
      >
      > ----- Original Message -----
      > From: "Thomas Adam" <thomas_adam16@...>
      > To: "Juan M. Medina" <juanmanuelmedina@...>; <vim@...>
      > Sent: Friday, June 20, 2003 11:12 AM
      > Subject: Re: Calling vim from command line bash - Not directly vim
      > related
      >
      >
      > > --- "Juan M. Medina" <juanmanuelmedina@...> wrote: > Hi!
      > > >
      > > > I use vim as my editor inside sqsh (an isql replacement to access =
      > > > sybase). I have created an alias in Cygwin bash that goes like this:
      > > >
      > > > alias sqlmyserver=3D'sqsh -S myserver -U myuser -P mypassword -D =
      > > > mydatabase -w 99999 -E "/usr/bin/vim -u ~/_sqshvimrc"'
      > > >
      > > > This works like a charm. The -E tells sqsh vim is the editor and it
      > =
      > > > calls vim with the "-u" so I can setup the initialization for this
      > vim,
      > > > =
      > > > which is basically set it up with SQL syntax highlighting.
      > > >
      > > > However, when creating the same alias in RedHat 9.0 bash, it does
      > not =
      > > > work, as it does not pass the "-u" parameter to vim but to sqsh,
      > which =
      > > > is wrong.
      > > >
      > > > Sorry about asking a non direct question about vim, but I really
      > like to
      > > > =
      > > > have it as my sqsh editor and with the SQL syntax highlighting it is
      > the
      > > > =
      > > > best tool for editing my queries.
      > >
      > > You could try exporting something like....
      > >
      > > export EDITOR="/usr/bin/vim -u ~/.some_file"
      > >
      > > and put that in ~/.bashrc
      > >
      > > HTH,
      > >
      > > -- Thomas Adam
      > >
      > > =====
      > > Thomas Adam
      > >
      > > "The Linux Weekend Mechanic" -- www.linuxgazette.com
      > >
      > >
      > ________________________________________________________________________
      > > Want to chat instantly with your online friends? Get the FREE Yahoo!
      > > Messenger http://uk.messenger.yahoo.com/
      > >

      =====
      Thomas Adam

      "The Linux Weekend Mechanic" -- www.linuxgazette.com

      ________________________________________________________________________
      Want to chat instantly with your online friends? Get the FREE Yahoo!
      Messenger http://uk.messenger.yahoo.com/
    Your message has been successfully submitted and would be delivered to recipients shortly.