On 7/6/09, Ben Fritz <[email protected]> wrote: [...] > > I want to let vim execute this myscript.vim only when the first line > > of the memfile.psm file contains more then one word. > > Otherwise it should do nothing, > > vim -c "if getline(1)=~'\v^\W*\w+%(\W+\w+)+\W*$' | source myscript.vim > | endif" memfile.psm >
I should have said exit vim instead of do nothing. Because now my batch files hangs on an open vim-session. How do I change the line, given by Ben Fritz, so that I can add an else where it says exit vim So vim -c "if getline(1)=~'\v^\W*\w+%(\W+\w+)+\W*$' | source myscript.vim 'else exit vim' <== (pseudo code) | endif" memfile.psm Rgds Jeri --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
