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

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 message » categorize

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

The following modification to Shian Lee's Unicode/Utf8 editor, "edu.ex" will provide context sensitive help via help from the RDS text documentation if the library.doc option is selected from the top line help menu in Euphoria 3.1 or earlier. Also works in "ed.ex".

I thought this might be useful for minimalistic installations.

 
-- Searches text documentation in early versions of euphoria 
-- prior to 3.1 or earlier for word specific article 
-- Insert the following procedure before the routine  
-- "get_escape(boolean help): 
procedure text_context_help(char key, object self_command) 
sequence this_line, white_space, search_path, search_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                   
search_word = this_line[first_non_blank..b_col -1 - (key= ' ')] 
search_word = "<" & search_word & ">" 
add_queue(self_command & SLASH & "library.doc" & CR &  
          ESCAPE & "f" & search_word & CR & ESCAPE & "y" & CR) 
end procedure 
 
-- Within the routine get_escape(boolean help) 
-- context sensitive text help -- Euphoria 3.1 or earlier 
-- if library.doc is selected, the specific article for the current 
-- word will be displayed. 
  elsif answer[1] = 'l' then 
--add_queue(self_command & SLASH & "ed.doc" & CR) 
  text_context_help('l', self_command) 
 
new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu