Context Sensitive Help for Shian Lee's Unicode/Utf8 editor, "edu.ex"

new topic     » topic index » view thread      » older message » newer message

Download Juergen Leuthje's "EuHTHelp.ex" from the RDS Archives: EuHTHelp.ex

-- add this function just before the procedure get_escape(boolean help) 
-- this code is taken from the "try_auto_complete" routine: 
function context_help(char key = 'h') 
 
    sequence this_line, white_space, current_word 
		natural first_non_blank 
		 
    this_line = buffer[b_line] 
    white_space = this_line = ' ' or this_line = '\t' 
    first_non_blank = find(0, white_space) -- there's always '\n' at end                   
    current_word = this_line[first_non_blank..b_col -1 - (key= ' ')] 
     
return current_word 
end function 
 
procedure get_escape(boolean help) 
 
-- comment out all the existing code  
-- of the elsif command[1] = 'h' clause: 
elsif command[1] = 'h' then 
 
        -- insert the following line:     
	shell("exu EuHTHelp.ex " & context_help()) 
         

Now, immediately upon completing the entry of a command press ESCAPE + 'h' and a context specific article or the reference manual will be opened in a browser window or tab.

Works like a charm.

Regards, Ken Rhodes

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu