Hi Jeri!

On Di, 07 Jul 2009, Jeri Raye wrote:

> 
> On 7/6/09, Ben Fritz <[email protected]> wrote:
> >
> > vim -c "if getline(1)=~'\v^\W*\w+%(\W+\w+)+\W*$' | source myscript.vim
> > | endif" memfile.psm
> >
> 
> How do I change the line, given by Ben Fritz, so that I can add an
> else where it says exit vim

untested:

vim -c "if len(split(getline(1),'\W\+')) > 1 | source myscript.vim |  
else |quit | endif" file

regards,
Christian
-- 
:wq!

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

Reply via email to