On Sunday, 11 December, 2011 at 21:23:42 GMT, Tony Mechelynck wrote:
function TestQF(command)
        if getqflist == []
                exe a:command
        endif
endfunc

then invoke it with

        :w | call TestQF('whatever')

Thanks. I tried this, but still thought it was too much extra typing, so I came 
up with this:

autocmd BufWritePost *.pl
\ make |
\ if getqflist() != [] |
\   let s:tmp = input("Press enter to continue or ctrl-c to abort") |
\ endif

Now, at least if the make found errors, I get the opportunity to do something 
about it (ie. press ctrl-c), thus preventing the rest of my :w command from 
executing. It also has the side-effect of allowing me to see the errors. Eg.,

      :w | whatever

If the make found no errors, whatever will happen. If the make found errors, I 
get to see them straight away and am given the prompt which allows me to decide 
to abort or proceed with executing whatever, should I choose. This suits me 
fine :)

--

.

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Reply via email to