run Tcl/TK script from within Vim? 
Author Message
 run Tcl/TK script from within Vim?

Is it possible to use the Vim of GVim editor to run a Tcl script,
check the errors and continue editing??
*********************
to send direct email remove "fake" from address


Thu, 07 Oct 2004 22:19:39 GMT  
 run Tcl/TK script from within Vim?

Quote:

> Is it possible to use the Vim of GVim editor to run a Tcl script,
> check the errors and continue editing??
> *********************
> to send direct email remove "fake" from address

try

:!wish %

which will run wish on % which vi/vim/gvim expand to be the file name
you are currently editing

This works under unix and dos.



Thu, 07 Oct 2004 23:15:07 GMT  
 run Tcl/TK script from within Vim?


:Is it possible to use the Vim of GVim editor to run a Tcl script,
:check the errors and continue editing??

Interestingly enough, even though vim is one of the editors which has
been modified to have a built in Tcl interpreter, I seldom see people
post scripts here to take advantage of that benefit.  So I don't know
how much vim can do.

However, not that in the vim runtime/doc/if_tcl.txt , runtime/syntax/tcl.vim ,
and runtime/tools/tcltags you will find some information about the use of tcl
with vim - the latter is a shell command to generate a vim tag file for
Tcl code.

--
"I know of vanishingly few people ... who choose to use ksh." "I'm a minority!"

Even if explicitly stated to the contrary, nothing in this posting
should be construed as representing my employer's opinions.



Sat, 09 Oct 2004 02:31:56 GMT  
 run Tcl/TK script from within Vim?
At the moment I am running a Tcl/Tk script from gVim under Windows 95
by doing:

:!start wish %

That runs the currently edited Tcl/Tk file from the editor and any
errors are displayed in an error dialog box. Eventually I would like
to be able to get Vim to see Tcl as a "compiler" and to use the
"errorformat" to get the Tcl error and highlight the offending line
within the gVim editor. It has been done apparently, from reading old
posts. Does anyone have a Vim script to be able to do this?

Larry Gagnon


Quote:


>:Is it possible to use the Vim of GVim editor to run a Tcl script,
>:check the errors and continue editing??

>Interestingly enough, even though vim is one of the editors which has
>been modified to have a built in Tcl interpreter, I seldom see people
>post scripts here to take advantage of that benefit.  So I don't know
>how much vim can do.

snip...
*********************
to send direct email remove "fake" from address


Sat, 09 Oct 2004 09:10:01 GMT  
 run Tcl/TK script from within Vim?

Quote:

> Interestingly enough, even though vim is one of the editors which has
> been modified to have a built in Tcl interpreter, I seldom see people
> post scripts here to take advantage of that benefit.  So I don't know
> how much vim can do.

I have had a very interesting tcl application:
an interface to ispell process. The script starts ispell in a child
process and the ask it about the words user types and instantly highlight
errors. It works much more effectively than to run ispell on each word.

I'm not  sure, but you can probably find it on vim.sf.net.

--
fortran is not a flower but a weed -- it is hardy, occasionally blooms,
and grows in every computer.
                -- A.J. Perlis



Sat, 09 Oct 2004 14:45:36 GMT  
 run Tcl/TK script from within Vim?

Quote:


> :Is it possible to use the Vim of GVim editor to run a Tcl script,
> :check the errors and continue editing??

> Interestingly enough, even though vim is one of the editors which has
> been modified to have a built in Tcl interpreter, I seldom see people
> post scripts here to take advantage of that benefit.  So I don't know
> how much vim can do.

Vim's built in Tcl interpreter is very useful to me. I have some scripts to
interact with CVS, which are very useful, although somewhat buggy.
Unfortunately, trying to start up the event loop in Tcl from within Vim results
in Vim{*filter*} until Tcl exits. I've thought about looking at the code to see if
it is possible to have Tcl running in a seperate thread, with Tk and a complete
event loop. Then you could add lots of Tk GUIs around the main Vim window, which
would be cool.

Quote:

> --
> "I know of vanishingly few people ... who choose to use ksh." "I'm a minority!"

> Even if explicitly stated to the contrary, nothing in this posting
> should be construed as representing my employer's opinions.

--
package r Tkhtml;package r http;pack [scrollbar .v -o v -co {.h yv}] -s right\
-f y;pack [html .h -ys {.v set}] -f both -e 1;bind .h.x <1> {eval g [.h href %x\
%y]};proc g u {set t [http::geturl $u];.h cl;.h p [http::data $t];http::cleanup\
$t;.h co -base $u};g http://www.*-*-*.com/ ;proc bgerror args {};# NEM :-)


Sun, 10 Oct 2004 08:12:52 GMT  
 run Tcl/TK script from within Vim?

Quote:

> I've thought about looking at the code to see if
> it is possible to have Tcl running in a seperate thread, with Tk and a complete
> event loop. Then you could add lots of Tk GUIs around the main Vim window, which
> would be cool.

More than cool, it could be the basis of a super powerful
Tcl/Tk IDE!


Sun, 10 Oct 2004 21:05:07 GMT  
 run Tcl/TK script from within Vim?


:> I've thought about looking at the code to see if
:> it is possible to have Tcl running in a seperate thread, with Tk and a
:complete
:> event loop. Then you could add lots of Tk GUIs around the main Vim
:window, which
:> would be cool.
:More than cool, it could be the basis of a super powerful
:Tcl/Tk IDE!

If someone decides to work on this, be aware that BSD's nvi has a similar
capability (as does perhaps a few other editors) - perhaps people using
each editor could work together and come up with some general code that
would be relatively common?
--
"I know of vanishingly few people ... who choose to use ksh." "I'm a minority!"

Even if explicitly stated to the contrary, nothing in this posting
should be construed as representing my employer's opinions.



Tue, 12 Oct 2004 18:51:19 GMT  
 
 [ 8 post ] 

 Relevant Pages 

1. Running a TK script using wish80.exe within a tcl script

2. Running a Tcl/Tk applet within a Tcl/Tk program

3. running a tcl script from within a sub folder

4. Run a Perl script within TCL

5. problems running tk-script with tcl/tk 8.3.3

6. Running scripts within scripts

7. Using Tcl/Tk within Source Navigator : sample script crashes

8. Tcl/Tk within a script

9. Tcl/Tk scripts run inside C program

10. How to run Tcl/Tk scripts with windows ?

11. running tcl/tk script

12. Can _One_ Tcl/Tk script run _Two_ displays?

 

 
Powered by phpBB® Forum Software