Folks, is it possible somehow to send arbitrary commands to the vim
instance without using client-server communication?

I have the following bash function which "tees" output of any shell
command and if there are any errors it opens vim with :copen option:

function vimize ()
{
  local file=/tmp/vimize.errors
  rm $file 2> /dev/null
  $1 "$2" "$3" "$4" "$5" "$6" "$7" "$8" "$9" 2>&1 | tee $file
  grep ': error:' $file
  if [ "$?" == "0" ] ; then
    vim -q $file -c :copen
  fi
}

It works just fine, the only problem is the fact it opens the *new*
vim instance while I'd like it to use the *existing* one if vim is
already running.

I know that I can use "--remote" stuff for that, but there are some
downsides with this approach:

1) some distros(e.g Ubuntu 8.10) package vim with -clientserver
2) vim is required to be run with --servername option, which is quite
easy to forget(well I can create a shell alias for 'vim' command but I
really don't like aliasing existing binaries)

Any ideas?

-- 
Best regards, Pavel

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to