HippoEDIT homepage Welcome, Guest. Please login or register.
September 07, 2010, 08:17:43 am
Home Help Search Login Register

+  HippoEDIT - Programmers text editor
|-+  General Category
| |-+  FAQ (Moderators: alex, Stefan)
| | |-+  Passing Parameters to tools
« previous next »
Pages: [1] Print
Author Topic: Passing Parameters to tools  (Read 616 times)
jpau1953
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 3


View Profile
« on: August 11, 2009, 05:37:25 pm »

I am evaluating HE as a replacement for my current editor. In order to use my existing makefiles and compiler tools from HE I need to pass in the file name with no extension. Is this possible?
Logged
Arthur
Hero Member
*****

Karma: +1/-0
Offline Offline

Gender: Male
Posts: 597


He who is ashamed of asking is afraid of learning.


View Profile WWW
« Reply #1 on: August 11, 2009, 06:30:47 pm »

Hello jpau1953, and welcome aboard!

I am sure You will find HippoEdit a wonderful replacement to your current editor.

I suggest using the top option for current file name %Document% found in the Manage Tools -> Argument (or using the arrow).
It is in case you have this file w/o the extension loaded into HE.
Frankly, I am curious why one would need to not to specify an extension?
Logged
alex
Developer
Global Moderator
Hero Member
*****

Karma: +19/-2
Offline Offline

Gender: Male
Posts: 1334



View Profile WWW
« Reply #2 on: August 11, 2009, 09:08:24 pm »

Hi jpau1953,

welcome. Currently there is no tag to get document name without extension. You only can get a file name with extension using tag %Document% as suggested by Arthur.
If you would explain why this is necessary I can add the tag with new beta -  it is not complex.

Best regards,
Alex.
Logged

jpau1953
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 3


View Profile
« Reply #3 on: August 12, 2009, 01:00:39 pm »

I have tried to reply 3 times now an every time I submit the reply the forum says I timed out. I'll try again...

The reason for needinf the filename without extension is the structure of our makefiles. They want a target file with a ".o" or ".obj" extension as a command line argument. Changing hundreds of makefiles and retesting them really isn't an option.

The editor currently used is Codewright and it has many tags that can be passed to external tools.

%r is the root filename I'd put more but I'm afraid I'll timeout

Thanks

Logged
alex
Developer
Global Moderator
Hero Member
*****

Karma: +19/-2
Offline Offline

Gender: Male
Posts: 1334



View Profile WWW
« Reply #4 on: August 12, 2009, 02:20:34 pm »

Strange, I do not get problems with timeout... Maybe server was overloaded, or some crawler was intensively running..

About the request. Ok, now clear. The new tag for current file name without extension would be added with new beta. But maybe better way would be integration of regular expression in templates engine, then you can just do a post processing of the result. But this is too much work for 1.4x, maybe would be added 1.5x.

Another thing I noticed, probably I would introduce more shorter aliases for tag names, to have something like %d% instead of %Document% and so on...

Best regards,
Alex.
Logged

Stefan
Administrator
Hero Member
*****

Karma: +6/-0
Offline Offline

Posts: 684



View Profile
« Reply #5 on: October 03, 2009, 08:44:37 pm »

EDIT: 
i do currently collect all vars in an another thread with explanation and examples.
I will also provide an collection of shortcuts for this vars.
Than we can discuss this about this collection.





Hi Alex, i think this spelling is not that good for remembering them,
%Document%
%FileNameWOExt%

"Document Name" item could be named "File name" in in the context menu
as in that context menu there is used 'file' for other items too.
%Document% could be %FileName%

But the item "Path and name of file" give us currently already %FileName% too... this could be named %FullName%


%FileNameWOExt% could be %BaseName% or %FileBase%
as 'base' is an common used  with renamer-app too.



... and the extension part is missing as token on it's own  ==> %ext%



But, What do you think about
having the item "Document Name" respective "File name"
simple insert an token like %FileName%.%ext%
so you save space in this ctx menu and fit all needs
as one can take what he need to set up his tool:
 %FileName%.%ext%
or
 %FileName%.bak
or
NewName.%ext%
or
 %FileName%_backup.%ext%



Now that i am on it
i see that %Date% and %Time% are also missed from this ctx menu.
(If someone need them right now: they could be found at CodeTemplates)
 %FileName%_bak_%Date%.%ext%


I mean you could make a note for later
to pimp this ctx menu by adding
some sub-menus like ">> Project" and ">>Interactive"
and then add more %placeholder%-vars.


And i would like to remind to add some more default env vars to the menus
like %ComputerName% , %UserName% and %ProgramFiles% and like this
so that it is more obvious for new users that this could be used too.
 %FileName%_bak_%ComputerName%_%UserName%_%Date%.%ext%
(If someone need them right now: they could be found by opening an DOS-Box and type in set)

Therfore this could be dropped:
%FP_NO_HOST_CHECK%
%NUMBER_OF_PROCESSORS%
%PROCESSOR_xxx%
« Last Edit: October 03, 2009, 10:14:15 pm by Stefan » Logged

Stefan, HippoEDIT beta tester  (HippoEDIT News On Twitter: http://twitter.com/hippoedit/)
alex
Developer
Global Moderator
Hero Member
*****

Karma: +19/-2
Offline Offline

Gender: Male
Posts: 1334



View Profile WWW
« Reply #6 on: October 03, 2009, 10:56:53 pm »

Hi Stefan,

sounds good. The template tag names were growing evolutionary, and there was no special "go through" to normalize them. So, if you can collect a list, publish, then we and other users can verify it, and then I would do the change.
There is a problem possible that existing templates would work wrong, but maybe, if name would not overlap, we can leave both version.

Also I had idea some when before to provide short aliases for tag names, something like w for current word etc. I have seen that somewhere.

But I would not do such change on 1.4x branch. Better on 1.50 as a major update, plus this can be combined with some other extensions I planned for templates as another texmate like style for tags etc (${}) to make easier to migrate snippets from other editors.

And about suggested environment variables, they are not hardcoded, but generated from currently registered, so it is complex to remove something, but probably some can be explicitly moved to main sub menu.

Best regards,
Alex
« Last Edit: October 03, 2009, 10:59:25 pm by alex » Logged

Pages: [1] Print 
« previous next »
Jump to:  


Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC