Syntax Settings Usability

Started by Stefan, December 10, 2008, 09:00:49 PM

Previous topic - Next topic

Stefan

I try to suggest some usability.
I guess this is already planed.
Perhaps this come in handy for your planing.



1.) Quick access to current syntax setting (like the Overview bar > "Preferences" -option)

I know about new shortcuts since 1.4 552
    * Options.AutoCorrection - opens Options AutoCorrection page
    * Options.Keyboard - opens Options Keyboard settings page
    * Options.CurrentFontsColors - opens Options Fonts and Colors page for current syntax
    * Options.CurrentCodeTemplates - opens Options Code Templates page for current syntax
    * Options.ColorSchemes - opens Options Color Schemes Page

But an new user have to setup that shortcut first.



I think about an default, built-in  way...

...like an second menu item "Current Syntax Settings"

or maybe
for "Options > +Syntax settings" -dialog
==> show an link to the current syntax below the "+Syntax settings" line?

File Explorer
Color Schemes
+Syntax settings
Current Syntax
Code Completion


------------------


2.)

I found the option to set the syntax-related-help by fortuity under the Help menu.

I suggest to have an link to "Help > Syntax Help > Manage Help" -dialog
on the syntax page "Options > +Syntax settings > syntax",
there where 'Windows', 'Editor' and 'Spacing' is too.

2b
is support for CHMs not implemented right now?

------------------


3.)

On this syntax page i would expect to find an function to modify syntax files. I guess this is on the todo list.

For now i mean an option would be nifty to open the syntax files into the editor as an document.
- go to your syntax
- click on [Open {lang_name}_spec.xml]
or [Open lang_name}_user.xml.]
- and this files are opened in HE... the Options-Dialog could be stay open.

-------------

4.)
the same for an link to "Syntax tools"-dialog
I suggest to have an link to "Tools > Manage Tools" -dialog

-----------------

5.)
Option to re-read the syntax file without restarting HE


-
Stefan, HippoEDIT beta tester 
HippoEDIT - the editor programmers wants to code thyself when they are dreaming.        -Don't just edit. HippoEDIT!-

alex

Hello Stefan,

I am accepting all of your suggestions! I have even done 1 in 1.40.552 ;)

1) Second option (current syntax in settings tree) was allready existing in 1.3x version, but I have removed it from 1.40, because from one side some user has complaining. It was called not current syntax but Fonts and Colors (HTML) and Code Templates (HTML), where HTML was a current syntax. Their point was that it was not clear that exist such separated settings and something under Syntax Settings (before called "Other Syntaxes")... But know, when there is menu item for this, I think problem with quick jump to current syntax settings solved.

2) This option for maintaining help I want to suggest you in another message but have not done yet ;) You find it by yourself.
2b) I have planned to add this already for a long time, but have not time, from one side, and from another coud not find a code of how to search for keyword in CHM... Do you know where in toher editors I can at least see example of work (TextPad)? I would try to fix this for 1.40

2, 3, 4) I agree, because it would be good to have a some central place from where you can access all syntax related properties. But I would not agree on page with 'Windows', 'Editor' and 'Spacing' because there is not enought space. Probably I would create new page Miscellaneous with all links/buttons.
But there are still can be problems with it, because all "Manage..." dialogs are modal, and settings dialog is modal. So I need to decide what to do: Save settings in Options dialog and opem Manage Dialog or try to open two modal dialogs...

5) This is more complicated, but possible. Probably in 1.50. Reason that before reloading of the new syntax I need to do really good clean up of everything that related to it, release all references etc and then restore them again. And to forecast all problems here is rather difficult. But already was in my list.

Thanks a lot for the suggestions!
HippoEDIT team
[url="http://www.hippoedit.com/"]http://www.hippoedit.com/[/url]

Stefan

> 2) This option for maintaining help I want to suggest you in another message
But my command line didn't has worked in this "Help > Syntax Help > Manage Help" -dialog
So i tried to use "Tools" instead.


>2b)... coud not find a code of how to search for keyword in CHM...
Why not simple "ShellEx" with "my" command line?

The full syntax of this command line is:
%SystemRoot%\hh.exe  mk:@MSITStore:%Path to CHM from User settings%::/docs/commands/%CurrentWord%.htm

The part /docs/commands/%CurrentWord%.htm opens the right page inside of the CHM

The problem is you have to check if this hh.exe exists.


> Do you know where in other editors I can at least see example of work
Examples? Yes! But before i post this, .... i have to take a look at this, to make no mistake.
Stefan, HippoEDIT beta tester 
HippoEDIT - the editor programmers wants to code thyself when they are dreaming.        -Don't just edit. HippoEDIT!-

alex

mk:@MSITStore:%Path to CHM from User settings%::/docs/commands/%CurrentWord%.htm
This would work only with AutoHotkey.chm, because, probably it has such structure inside. Other chm has no path like this /docs/commands/%CurrentWord%.htm, so I need to use some special logic to find correct url. Using strings, maps, etc internal structures of chm.

And about the Help dialog - I would try to do it more usable, and recognize which type of urls is used, to do special processing for chm and another for online urls.
Also if used Manage Help dilaog, it is possible to open help inside of hippo, as new tab.
HippoEDIT team
[url="http://www.hippoedit.com/"]http://www.hippoedit.com/[/url]

Stefan

One editor who can open strangers CHMs is PSPad
(Menu Settings > Highlighter settings...", click left on an syntax, click right on [Specification]

I have found no solution/code to browse CHMs topic to find right html page with keyword.
All i have found was the default command line where you have to know the correct path to the page inside the CHM file.

One work around is to use the free KeyHH.exe.
It's enough to install the setup once, and then copy the KeyHH.exe to HE programm folder.
Then use an command line like
keyhh -myhelp -#alink gui  AutoHotkey.chm
keyhh -ID -#klink KeyWord  chm-file

This means i have to provide the keyword and the CHM only, .... KeyHH do the  rest.

KeyHH homepage to download the KeyHHSetup.exe ==> http://www.keyworks.net/keyhh.htm

The installed and copied command line tool keyhh.exe itself and an help file you  can find here as attachement:
Stefan, HippoEDIT beta tester 
HippoEDIT - the editor programmers wants to code thyself when they are dreaming.        -Don't just edit. HippoEDIT!-

alex

Thanks a lot for your help!
I would check how PSpad it does, but good thing that it is possible ;)
If some other editor can, then HE also should be able  to do it ;)

I already have found some information how to browse internal structure of CHM, but need more time for analyzis.

I would check for solution, but probably in a one week - I go to the vaction from today till next Friday. And probably would not have till then Internet access.
HippoEDIT team
[url="http://www.hippoedit.com/"]http://www.hippoedit.com/[/url]

Stefan

#6
Quote from: alex on December 11, 2008, 02:11:09 PM

2, 3, 4) I agree, because it would be good to have a some central place from where you can access all syntax related properties. But I would not agree on page with 'Windows', 'Editor' and 'Spacing' because there is not enought space. Probably I would create new page Miscellaneous with all links/buttons.
But there are still can be problems with it, because all "Manage..." dialogs are modal, and settings dialog is modal. So I need to decide what to do: Save settings in Options dialog and opem Manage Dialog or try to open two modal dialogs...

Quote from: Beta NewsVersion 556:
    * New Options Page for Quick Links (Miscellaneous) contains links to Manage Tools and Help. Also for viewing and editing of Specification and user file for syntax. Details...
Thanks a lot for this feature!
Now i have seen why i am not was successfully to create an own syntax file:
- because HE look everywhere in HE-folder and sub-folder for an Syntax-XML file,
and not only in Syntax-folder but in sub-folders of the Syntax-folder too.
This way, HE every time takes my older backup syntax-xml files, which i have moved to an sub-folder of the syntax-folder.
So i have edited my new syntax files.....but HE still takes the first syntax file it found,... that old thing in my backup-sub-folder.
Bug or feature  ;D



BTW, just FYI
after modifying my default.hewsp to edit the wrong path to backup-sub-folder
and starting HE while files which using this syntax are still open
i got this message "Problem found, Do you want to send?"
I dont know where this cames from.
I have modified the default.hewsp again to delete this last *.ahk files... and then i could start HE without error msg.


--
EDIT:
changed 'suggested' to 'successfully'
Stefan, HippoEDIT beta tester 
HippoEDIT - the editor programmers wants to code thyself when they are dreaming.        -Don't just edit. HippoEDIT!-

alex

Hello Stefan,

First. It is a feature. HE scans all subfolders for settings files and recogniye them by FileType inside. Checked only xml files. This give possibility to user to have any file structure as he likes. Group some files, move, etc.
If you want to "hide" some files, rename them to somethind different from *.xml or move outside of the HE data directory.

Second. I have not understood what you have changed in default.hewsp, that caused the error.
Can you post here xml snapshot?
HippoEDIT team
[url="http://www.hippoedit.com/"]http://www.hippoedit.com/[/url]

Stefan

> First. It is a feature.
Ahh, i see. OK!


> Second. I have not understood what you have changed in default.hewsp, that caused the error.

> changed in default.hewsp,
I think i have explaned and/or make it wrong?
I think i had changed the path to my syntax xml files.
And i had deleted opened files which used this syntax

> that caused the error.
I see now, if i modify the  default.hewsp and modify the path to the last openend files.... and start then HE.... i get this error.
I will investigate further...
Stefan, HippoEDIT beta tester 
HippoEDIT - the editor programmers wants to code thyself when they are dreaming.        -Don't just edit. HippoEDIT!-

alex

#9
Ok... I have just not understood how to reproduce this...
What I have understood now:
You have changed  one of <Files></Files> to point to not existing file, and then you get the error? In my case if I only make path invalid, HE opens, but just skip invlalid file...
I would like to fix this, but first need to reproduce...

---
Ok! Now I have understood that you meant!! You just have not referenced to another thread about Adding new Syntax...
HippoEDIT team
[url="http://www.hippoedit.com/"]http://www.hippoedit.com/[/url]

Stefan

Don't make you to much work, Alex, maybe it's only me.


1.) i have modified an path under <Files> (the last section of <Files>, not LastUsed ones)
by adding an "old\\" somewhere into the path.
(i modified because i got error with my opened files)

2.) i have corrected this path back

3.) i start HE and got en error

4.) i had to delete the two *.ahk files from default.hewsp (the path was right), then i could start HE without error

<Files>
   <CHEDoc path="E:\\a\\HippoEDIT\\license.txt" position="(0,8)" top="73" eof="true" selection="(14,6,0,8)"/>
   <CHEDoc path="E:\\a\\HippoEDIT\\data\\Projects\\Untitled2.txt" top="73" eof="true"/>
   <CHEDoc path="E:\\a\\HippoEDIT\\data\\Projects\\Untitled3.txt" top="73" eof="true"/>
   <CHEDoc path="E:\\temp\\Untitled16.ahk" position="(16,2)"/>
   <CHEDoc path="E:\\temp\\Untitled26.ahk" active="true" position="(0,1)"/>
   <Project path="E:\\a\\HippoEDIT\\data\\Projects\\stefan.heprj"/>
</Files>


5.) then i test this again,  now i have an *.ahk file again in my hewsp

<Files>
   <CHEDoc path="E:\\a\\HippoEDIT\\license.txt" position="(0,8)" top="73" eof="true" selection="(14,6,0,8)"/>
   <CHEDoc path="E:\\a\\HippoEDIT\\data\\Projects\\Untitled2.txt" top="73" eof="true"/>
   <CHEDoc path="E:\\a\\HippoEDIT\\data\\Projects\\Untitled3.txt" top="73" eof="true"/>
   <CHEDoc path="E:\\temp\\Untitled18.ahk" active="true" position="(0,2)"/>
   <Project path="E:\\a\\HippoEDIT\\data\\Projects\\stefan.heprj"/>
</Files>



6.) Then i modified this path to
   <CHEDoc path="E:\\temp\\old\\Untitled18.ahk" active="true" position="(0,2)"/>

But now HE starts correct and just remove this file from the hewsp list.

It's hard to find what happens, i will take care and report if i see something again.
Stefan, HippoEDIT beta tester 
HippoEDIT - the editor programmers wants to code thyself when they are dreaming.        -Don't just edit. HippoEDIT!-

alex

Ok, I would wait for reproducable example ;)
HippoEDIT team
[url="http://www.hippoedit.com/"]http://www.hippoedit.com/[/url]

Stefan

#12
Beta 1.40 - 557: restart HE with Help open


1.) start Beta 1.40 - 557
2.) press F1 (help is opened inside HE)
3.) close HippoEDIT
4.) start HE, and ---> Msg "Problem with MFC App"

5] Open  default.hewsp
6] Go to the last <Files> block
7] and delete the line
<CHTMLDoc path="its:X:\\your path\\HippoEDIT\\HippoEdit.CHM::/html/start.htm" active="true"/>
8] start HE again and the Msg is gone.


-----
Upps, it's not only this help chm:

i want to reproduce this
a) open Help inside HE
b) close HE
c) start HE ---> error Msg
d) remove the HE.chm line from <Files>
e) start HE ---> error Msg

-----------------

f) remove all lines from <Files>
g) HE starts
h) modify HippoEdit.config to change false to true at '<CloseTabOnDblClick>'
i ) start HE ---> error Msg

I am still on the track...
I drop now my current HE-folder ans start with an fresh one.
Stefan, HippoEDIT beta tester 
HippoEDIT - the editor programmers wants to code thyself when they are dreaming.        -Don't just edit. HippoEDIT!-

Stefan

He he, i see you are on the righ track ;D

Version 568:
    * New feature. Auto search for keyword in connected CHM file

(my download is build 566 only ?)


I have:
- open file with your desired extension, like *.ahk
- chose menu "Help > Syntax help > Manage help"
- Add
   Title: AutoHotkey
   URL: data\syntax\AutoHotkey.chm  (relative path ;D :thumpsup:)
   Arguments: %CurrentWord%
   Shortcut: Alt+F2
   [X] open in external browser (instead of inside HippoEDIT)
- OK

Test works with external and inside browser,
wonderful! thanks.

(with 'inside' i get the single help page only, without index, side forward or backward.
But this is by design, depends of user habit.  One can still set to use 'external' browser.
Only i imaging for 'internal' an link to index page (, and maybe an option to open CHM itself external to search further topics) )

> Feature not finished yet,
O.K., fine, take your time ;D
Stefan, HippoEDIT beta tester 
HippoEDIT - the editor programmers wants to code thyself when they are dreaming.        -Don't just edit. HippoEDIT!-

alex

Hi Stefan,

good, that works :) As I know, there is no standard way to open (host) MS help control inside own application without toolbar etc. So I  need to implement this tabs by myself. That is why HE help for integrated mode comes with HTML index ;) But now I mostly decompiled complete CHM structure, at some time, I would add these tabs (Topics, Index and search).
Because I have already done so much stuff I think at all to develop some alternative shell for help browsing, based on this code and HE GUI lib (with Tabs, better filtering and search etc) :) But probably as freeware, because nobody need this for money :))

HippoEDIT team
[url="http://www.hippoedit.com/"]http://www.hippoedit.com/[/url]