accessing Lua helpfile directly from an editor
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

accessing Lua helpfile directly from an editor

Started by Mardeg, 18 July, 2004, 00:14:47

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Mardeg

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.


BottledHate

no go on that ftp link...
Homepage: www.bottledhate.webhop.org

Compiling  Lua scripts is LAME!!!!!

plop

QuoteOriginally posted by Mardeg - if someone can provide a permanent mirror site it would be good, it's soon to be mirrored (hopefully) at 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 <----<<

BottledHate

this is great... thanks!
Homepage: www.bottledhate.webhop.org

Compiling  Lua scripts is LAME!!!!!

Mardeg

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

Mardeg

#5
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

SMF spam blocked by CleanTalk