Author Topic: accessing Lua helpfile directly from an editor  (Read 2899 times)

0 Members and 1 Guest are viewing this topic.

Offline Mardeg

  • Forum Ace
  • *****
  • Posts: 75
  • Karma: +7/-1
    • The most bloated human-readable email hider in the world!
accessing Lua helpfile directly from an editor
« on: 18 July, 2004, 00:14:47 »
The helpfile in use here can be found at ftp://ftp.clanwos.org/pub/ebooks/Programming_in_Lua.chm
mirror: http://www.plop.nl/lua_tools/Programming_in_Lua.chm

This will allow you to go directly to a topic in the helpfile when you press F1 if the word the cursor is currently at in the editor is in the helpfile's index, otherwise it will just open the index at the closest word.

1. In Crimson editor Open Preferences dialog box (Tools -> Preferences) and select User Tools page
2. Select an empty slot and fill with the following arguments.
    - Menu Text: Lua Context Help
    - Command: C:\your\pathto\Programming in Lua.chm
    - Argument: $(CurrWord)
    - Initial dir: $(FileDir)
    - Hot key: F1
    - Close on exit: Yes
    - Save before execute: No


If you use a different editor that can do the same thing please add your how-to in this thread.

« Last Edit: 19 July, 2004, 23:14:49 by Mardeg »

PtokaX forum

accessing Lua helpfile directly from an editor
« on: 18 July, 2004, 00:14:47 »

Offline BottledHate

  • Triple Ace
  • **
  • Posts: 244
  • Karma: +2/-0
(No subject)
« Reply #1 on: 18 July, 2004, 08:20:25 »
no go on that ftp link...
Homepage: www.bottledhate.webhop.org

Compiling  Lua scripts is LAME!!!!!

Offline plop

  • Forum God
  • ****
  • Posts: 2 464
  • Karma: +37/-0
(No subject)
« Reply #2 on: 18 July, 2004, 17:22:19 »
Quote
Originally posted by Mardeg - if someone can provide a permanent mirror site it would be good, it's soon to be mirrored (hopefully) at http://ftp://ftp.clanwos.org/pub/ebooks/
it's mirrored on my site under the lua tools.
http://www.plop.nl/lua_tools.php

plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

Offline BottledHate

  • Triple Ace
  • **
  • Posts: 244
  • Karma: +2/-0
(No subject)
« Reply #3 on: 18 July, 2004, 19:19:33 »
this is great... thanks!
Homepage: www.bottledhate.webhop.org

Compiling  Lua scripts is LAME!!!!!

Offline Mardeg

  • Forum Ace
  • *****
  • Posts: 75
  • Karma: +7/-1
    • The most bloated human-readable email hider in the world!
(No subject)
« Reply #4 on: 14 August, 2004, 19:19:04 »
I tested a few different editors but have yet to encounter one that is able to both directly open topics in the helpfile AND associate the helpfile specifically with .lua filetype via F1 or other shortcut keys.

In UltraEdit (trialware) you can select "Add Help Files" from the Help menu, browse for the help file, name the item then click Insert. Highlighting a word then pressing F1 *will* open the related topic of the helpfile, but it also searches any other helpfiles you "add" (up to 5) without associating them with any filetypes.
EmEditor (trialware), PrEditor (trialware), TxtEdit (free/crippleware) and Context (freeware) were all able to open the helpfile.. but not at specific topics, even though all except TxtEdit have syntax highlighters and allow association of helpfiles/keyboard shortcuts with filetypes and have the ability to pass limited "arguments" when opening the helpfile.

PrEditor allows macros to be used in the argument but I have no idea if that's a way to access a word the cursor is on in the open .lua file.
Context can use %w (for the current word) in the argument, but not directly. Instead of being able to find the word in the topics, it needs the helpfile to be an extended .chm format that requires every html topic file inside the .chm to be either coded or named in a way that includes the word (%w) being looked up, ie. "mk:@MSITStore:Programming_in_Lua.chm::/wholedocument.html#%w" or "ms-its:Programming_in_Lua.chm::/%w.html"

So far the easiest one to use without the need to pay/crack is still Crimson Editor, though as yet it doesn't associate shortcut keys with specific filetypes.
That's enough from me, dreams beckon. Feel free to include editors I missed, just remember to mention if they're freeware/trialware/spyware/etc.
« Last Edit: 14 August, 2004, 19:19:43 by Mardeg »

Offline Mardeg

  • Forum Ace
  • *****
  • Posts: 75
  • Karma: +7/-1
    • The most bloated human-readable email hider in the world!
(No subject)
« Reply #5 on: 07 September, 2004, 21:21:33 »
Found it!
http://www.pspad.com/files/pspad/pspad431inst_en.exe (Freeware)

Settings -> Highlighters Settings
Select General4 at the bottom of the list then in the Specification tab, select Lua from the User Highlighters listbox.
Use the browse button to put the location of the Help File in the same tab, then click Apply
ALT+F1 to go to the topic of a word the cursor is on.

Additionally, you can add ptokax specific words to the highlighter via Settings -> User Highlighter, click Load, Lua.INI
« Last Edit: 07 September, 2004, 21:23:47 by Mardeg »

PtokaX forum

(No subject)
« Reply #5 on: 07 September, 2004, 21:21:33 »