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. 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

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


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.