[Vimoutliner] Fwd: vimoutliner patch

Peter Princz princzp at gmail.com
Thu Aug 31 04:34:40 EDT 2006


On 31/08/06, Steve Litt <slitt at troubleshooters.com> wrote:
> Hi all,
>
> I just got this. I don't understand what a quiet execution is, or how it
> differs from normal executable lines. Any ideas?
>
> SteveT
>
> ----------  Forwarded Message  ----------
>
> Subject: vimoutliner patch
> Date: Wednesday 30 August 2006 08:05 pm
> From: Brian Lewis <bsl04 at uark.edu>
> To: slitt at troubleshooters.com
>
> I submitted something like this a long time ago, but it didn't get
> accepted. It adds _exeq_ (quiet execution) support.
>
> --- vo_base.vim.backup  2006-08-30 19:01:28.000000000 -0500
> +++ vo_base.vim 2006-08-30 17:03:22.000000000 -0500
> @@ -528,12 +528,19 @@
>  function Spawn()
>                 let theline=getline(line("."))
>                 let idx=matchend(theline, "_exe_\\s*")
> -               if idx == -1
> -                       echo "Not an executable line"
> -               else
> +               if idx != -1
>                         let command=strpart(theline, idx)
>                         let command="!".command
>                         exec command
> +               else
> +                       let idx=matchend(theline, "_exeq_\\s*")
> +                       if idx != -1
> +                               let command=strpart(theline, idx)
> +                               let command="silent !".command
> +                               exec command
> +                       else
> +                               echo "Not an executable line"
> +                       endif
>                 endif
>  endfunction
>  endif
>
> -------------------------------------------------------
>
> --
> Steve Litt

Hi Steve,

I got it.
It prepends :silent before the !, when recognises the _exeq_ token
instead of _exe_.

This is the key:
original: let command="!".command
patch:  let command="silent !".command

Consult  :help :silent to see what exactly it does.
Makes sense on Windows at least when you don't want windows to bubble
up just to be closed. :)

Have a nice day,
  Peter

-- 
Keep cool. Develop in total darkness.


More information about the VimOutliner mailing list