[Vimoutliner] Fwd: vimoutliner patch

Peter Princz princzp at gmail.com
Thu Aug 31 14:02:28 EDT 2006


Hi Steve,

see my answers and comments inline.

>
> Hi Peter,
>
> Did you use it on Windows, or Linux? On my Mandriva 2006 machine, I get no
> popup OK box, but instead get a little message at the bottom of the graphical
> Vim window.

I was referring strictly to Windows. Currently I use vimoutliner on
Windows only and there is a window bubbling up with every shell
invocation. Sometimes it's desired to see it and close it manually,
but sometimes it's annoying.

>
> I assume Brian's idea is to have ,,e work on either _exe_ or _exeq_. I like
> the idea that it doesn't require another comma comma command.

Exactly. It just changes your "if" construct, and ,,e will recognise
both _exe_ and _exeq_. Simple and elegant.

Now your spawn() looks like this on my computer, after appying the patch:

"...
function Spawn()
	let theline=getline(line("."))
	let idx=matchend(theline, "_exe_\\s*")

	" was:
	" if idx == -1
	" 	echo "Not an executable line"
	" else
	" 	let command=strpart(theline, idx)
	" 	let command="!".command
	" 	exec command
	" endif
	
	" patch:
	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
..."

>
> If we include it, one thing we need to be sure of is that, on Windows, Linux
> graphical (gvim) and Linux CLI (vim),  that _exeq_ does the right thing when
> confronted with ,,e.

Yes, your standard testing procedures shall be applied before
releasing it to the public. But I can't do that. I can only comment it
works as expected on windows2000sp4, vo over gvim7 that I have.

Have a nice day,
  Peter

-- 
Keep cool. Develop in total darkness.


More information about the VimOutliner mailing list