[Github-comments] [geany/geany] Geany and Tcl/Tk: how they can help each other (#1808)

aplsimple notifications at xxxxx
Fri Mar 16 08:23:32 UTC 2018


There below is a zip file providing a context help on Tcl/Tk commands and keywords while editing Tcl script in Geany IDE.

By context help I mean the following: while editing a file.tcl in Geany you can set the caret on desirable Tcl command/keyword and press Ctrl+F1 (or F1, if you map it to Geany's context action) - after that you should get a help (man) page for the Tcl command/keyword.

Man pages of www.tcl.tk are remarkable with their giving a separate man page (as html file) for each single entry. So, we can organize their viewing on context base.

And Geany is remarkable with its customizing options and one of them is a context action. The action  may be tuned and called for a word or text selection from popup menu or with a hotkey.

-------------------------

Now let's customize Tcl/Tk context help in Geany IDE. As a bonus you'll get a menu of commands to use in Geany IDE unrelated to Tcl/Tk directly, thus Geany and Tcl/Tk would **help each other** as declared.

Please try this:

**1**. If you do not have Tcl/Tk on your system, install it from [www.tcl.tk](http://www.tcl.tk). Linux users have it preinstalled, most likely.

**2**. Unpack the below attached zip to save files:
```
    e_help.tcl
    e_menu.tcl
    run_pause.bat
    run_pause.sh
```
   into some directory, e.g. /home/me/UTILS

**3**. Go to Geany's menu 'Edit/Settings', then to 'Tools' page and enter in the 'Context action' field:
```
    wish /home/me/UTILS/e_menu.tcl "s=%s"
```
**4**. In /home/me/UTILS/e_help.tcl change the lines containing:
```
     set my_browser "...put your browser as last here, others may be removed..."
```

**5**. In /home/me/UTILS/e_menu.tcl change the lines containing:
```
    run_pause.sh   (for Linux)
    run_pause.bat  (for Windows)
```
   so that they were the full pathnames:
```
    /home/me/UTILS/run_pause.sh
    /home/me/UTILS/run_pause.bat
```

-------------------------

Uff. Now you should be able to call the context help. While editing your Tcl/Tk script, select a Tcl/Tk command or simply place the caret on it and call "Context action" from popup menu. You should see something like:

![tcl_geany](https://user-images.githubusercontent.com/37333988/37510187-62b1a500-290b-11e8-8f2f-056a3bba1f49.jpg)

where 1st line calls Tcl/Tk help for "selection" (i.e. foreach, string, grid, panedwindow etc. - about 200 Tcl/Tk man pages and 26 pages of Tcl keywords from A.htm to Z.htm)

Other lines execute "selection" as an executable program by itself and by shell in console, with or without waiting their completion.

---------------------

[tcl_and_geany.zip](https://github.com/geany/geany/files/1818354/tcl_and_geany.zip)


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/1808
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20180316/3b73801f/attachment.html>


More information about the Github-comments mailing list