rejetto forum

Find and Replace for the template editor.

TSG · 23 · 11142

0 Members and 1 Guest are viewing this topic.

Offline TSG

  • Operator
  • Tireless poster
  • *****
    • Posts: 1935
    • View Profile
    • RAWR-Designs
I have brought this up before, but i think its time to revive the topic...

Can we get a Find and Replace feature for the template editor, with the option to Match Case, sometimes when making quick adjustments i need to edit a lot of redundant code or variables, in various places on the template, this feature can turn a 10minute job into a 10second job :)

atm i find myself pasting the entire template into notepad++ and using its find and replace feature, but it should be easy to implement a simple version into the HFS template editor i'm sure... its just an adaptation of the Find feature.


Offline Foggy

  • Tireless poster
  • ****
    • Posts: 806
    • View Profile
I think this could help the editors out a heap, and make life so much easier for everyone :)

While we are on the topic of the template editor the option to undo an action more then once would be useful
« Last Edit: October 07, 2007, 08:52:22 AM by Foggy »


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
...and what if HFS could be able to use an external editor?

it could create a temp file
open it with the editor
monitor every file saving, considering it as an "apply"


Offline Mars

  • Operator
  • Tireless poster
  • *****
    • Posts: 2059
    • View Profile
Rejetto, simply the possibility of being able to call a program of external edition which is launched with the extension .tpl, this extension would be associated by the user by " click straight ahead on the tpl " and " to open with by default " 
I associated at home the tpl with notepad ++ ....


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
no, other softwares may be using the TPL file extension
i cannot rely on it


Offline TSG

  • Operator
  • Tireless poster
  • *****
    • Posts: 1935
    • View Profile
    • RAWR-Designs
...and what if HFS could be able to use an external editor?

it could create a temp file
open it with the editor
monitor every file saving, considering it as an "apply"

Thats also a another idea. It has crossed my mind many times.

No reason to eliminate the template editor itself... i still think it should have find and replace for quick edits, i understand pretty print is harder to achieve, its been discussed before, which means major edits are best done with an external editor... but for a quick name change, find and replace will be quite handy... a simple dialog with Find Next, Find and Replace, Find and Replace all.... My only concern with this is, HFS will need to remember to undo all the last change at once, instead of the last replaced item, otherwise fixing an incorrect variable or something will be a pain.
« Last Edit: October 08, 2007, 12:27:05 AM by That_Stevens_Guy »


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
i still think it should have find and replace for quick edits

you didn't understand.
when an external editor is configured, only that would be used.
you wouldn't have 2 editors.


Offline Mars

  • Operator
  • Tireless poster
  • *****
    • Posts: 2059
    • View Profile
1 possibility to use internal editor, and not the popup windows with internal diff template?

2 context menu on a folder --> advanced--|
                                                        |-- Local Diff Template
                                                        |-- External hfs.diff.tpl
                                                        |-- ...

3 and we can use internal or external editor using a choice of editor into menu/options .


Offline TSG

  • Operator
  • Tireless poster
  • *****
    • Posts: 1935
    • View Profile
    • RAWR-Designs
1 - I like :). 2 - no point if first point is achieved. 3 - Too complex mars, better if HFS just listens for external changes.

I understand that this would be the case, My only concern rejetto is that you are giving up on the template editor altogether... but I am quite happy to use notepad++ so long as HFS listens to all saves of the file  :D thats where all my script and css files are. Also for those that haven't tried, choosing teh html format for the .tpl document, it brings up pretty print. If you give this ability I will just use notepad++, the HFS template editor just being the place where we import the template.
« Last Edit: October 08, 2007, 04:02:58 AM by That_Stevens_Guy »


Offline bacter

  • Operator
  • Tireless poster
  • *****
    • Posts: 681
    • View Profile
If we have diff.templates in any folder, using the built-in editor from hfs results anyway enoying. So best is to edit all with a external editor like notepad++.

Rejettos proposal is is ok.

But instead of improving the editor for diff templates, it would be more simple and more useful the 'third option' for diff templates proposed in another post:  #include /path/templatename.tpl (and now in the first position of the to-do-list).

and perhaps for the main template, instead of edit- import - apply a simple option: reload template.
your computer has no brain - use your own !


Offline Mars

  • Operator
  • Tireless poster
  • *****
    • Posts: 2059
    • View Profile
Another solution would be to be able to use,

 or a template which would be in the same directory as hfs.exe,
 then this one would be saved and reloaded in every runnning hfs under the name of hfs.tpl or;

 or we could use a link in ROOT (as virtual folder) of hfs in the form of file masked with as hfs.diff.tpl name,
 in this way if the file exists then this one would be in charge be loaded with instead of the others for the page
" http: // mysite "

if ROOT is assigned as a real folder, put hfs.diff.tpl into the real folder is same as below...





Offline TSG

  • Operator
  • Tireless poster
  • *****
    • Posts: 1935
    • View Profile
    • RAWR-Designs
I don't want to hit another button bacter, i prefer rejetto's initial proposal of it listening for saves on the external file, so basically hfs will read its template from an external file, instead of the editor, there is no point in complicating things, it just confuses the interface and gives rejetto more work to do.

I cant say i'm very concerned with diff.templates, i am yet to use one, so i am going to assume mars' idea there is having the same effect for diff.templates, making HFS read an external file.


Offline Giant Eagle

  • Tireless poster
  • ****
    • Posts: 535
  • >=3 RAWR!
    • View Profile
    • RAWR-Designs.com
I think it would be best if the already existing "hfs.tpl" listens for updates, using an external editor for example, and 'applies' this to the template.

This does not only grant the possibility to modify the template with the program of your choice, but it makes the installation of a new template alot easier aswell :). Just replace hfs.tpl.


Offline TSG

  • Operator
  • Tireless poster
  • *****
    • Posts: 1935
    • View Profile
    • RAWR-Designs
YAAAY we can even make an installer for lazy people with this functionality.  ;)


Offline Foggy

  • Tireless poster
  • ****
    • Posts: 806
    • View Profile
YAAAY we can even make an installer for lazy people with this functionality.  ;)

Being a lazy person I like that idea :P