 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Do you want HiEdit internaly |
| Yes |
|
52% |
[ 37 ] |
| No, I like Edit control |
|
28% |
[ 20 ] |
| Other (please explain) |
|
19% |
[ 14 ] |
|
| Total Votes : 71 |
|
| Author |
Message |
majkinetor
Joined: 24 May 2006 Posts: 4114 Location: Belgrade
|
Posted: Fri Nov 14, 2008 11:01 am Post subject: |
|
|
Hej.
No, HiEdit can't do it, and I am not aware of any editor that can do it.
It is certainly a good feature and I am too interested to know the answer.
One interesting thing to note is that it would be possible to implement such editor in AHK, I think
The idea is kinda extreme but not that hard to implement:
1. Instantiate hiedit and set event to monitor text changes.
2. On any change, grab visible text.
3. Using defined regular expressions, search that text for it.
4. If you find that expression, you take literal word you found, add it to the hes file, and set the new hes file again.
This is enough so you can add RE words, but it still will not be enough to highlight sentences, but again, I don't know any editor that can highlight key sentences.
So, this dynamic hes file building may do the trick.
Actually, speaking about it, modern editors are IMO way bellow what should they have been in 2009. I mean, there are 1000 of them and all are similar or pure garbadge. Vim is different tho, but I still wait to see editor that can support things you said, custom highlighting, language-independent regions (vim has this), custom marking, unconnected copy regions, mark saving (vim has it partially), regular expression search and replace with entire text (edit plus has it), independent multi syntax highlighting (some has it for specific languages, like CSS+HTML+JS, but nothing is there for general scenario) _________________
 |
|
| Back to top |
|
 |
automaticman
Joined: 27 Oct 2006 Posts: 483
|
Posted: Fri Nov 14, 2008 11:15 am Post subject: |
|
|
| majkinetor wrote: | No, HiEdit can't do it, and I am not aware of any editor that can do it.
It is certainly a good feature and I am too interested to know the answer... | Btw. EmEditor can do this, but is limited to only 10 regex definitions. Sometimes limitations can be useful and let one concentrate on essential and relevant things/information but it would be great to break this limitation with the help of ahk and maybe also HiEdit. |
|
| Back to top |
|
 |
majkinetor
Joined: 24 May 2006 Posts: 4114 Location: Belgrade
|
Posted: Fri Nov 14, 2008 3:06 pm Post subject: |
|
|
I guess that is primary concern about that thing - Parsing bunch of reg-exps is probably slow if you don't limit the count.
It was pretty bad design idea to hard-code the limit tho. Users with faster computers could allow themselves larger number of RE's, especialy non complex ones... Perhaps you could influence the author to add some configuration flag that will by default be 10.
Also, there are light RE implementations. I have one such library here, and it contains most important subset of PERL RE. Size and speed are priority for such library. Utilising such library in editor project is perhaps the way to go.
Thx for information automaticman, it may come handy one day... _________________
 |
|
| Back to top |
|
 |
automaticman
Joined: 27 Oct 2006 Posts: 483
|
Posted: Fri Nov 14, 2008 3:11 pm Post subject: |
|
|
| majkinetor wrote: | | ...Thx for information automaticman, it may come handy one day... | At anytime again for geniuses like you, my friend majkinetor. |
|
| Back to top |
|
 |
rulfzid
Joined: 27 Nov 2008 Posts: 62
|
Posted: Mon Dec 01, 2008 8:32 am Post subject: |
|
|
It would seem from the hiedit.inc file that drag-and-drop selection/insertion is built-in to the control. And it actually works perfectly well in the hieditdemo.
But unlike the standard cut/copy/paste functions (ctrl-a/c/v/x etc), which "just work" with the HiEdit control, the drag and drop does not.
Is there something I need to be doing to enable this, or is it just a weird thing about the control (in which case i might try to put together a HiEdit analog of this?
Thanks,
rulfzid |
|
| Back to top |
|
 |
majkinetor
Joined: 24 May 2006 Posts: 4114 Location: Belgrade
|
Posted: Mon Dec 01, 2008 12:36 pm Post subject: |
|
|
I never noticed that because I never use this feature in any editor.
What you say seems right. I don't know why it doesn't work. _________________
 |
|
| Back to top |
|
 |
DHMH
Joined: 17 Jul 2008 Posts: 194
|
|
| Back to top |
|
 |
DHMH
Joined: 17 Jul 2008 Posts: 194
|
|
| Back to top |
|
 |
majkinetor
Joined: 24 May 2006 Posts: 4114 Location: Belgrade
|
Posted: Wed Feb 04, 2009 6:06 pm Post subject: |
|
|
You better change your weed provider
Documentation is generated from the script.  _________________
 |
|
| Back to top |
|
 |
DHMH
Joined: 17 Jul 2008 Posts: 194
|
|
| Back to top |
|
 |
soggos
Joined: 27 Mar 2008 Posts: 85 Location: France
|
Posted: Fri Feb 06, 2009 12:45 pm Post subject: possible to save in RTF like NotePad++ ? |
|
|
Hello;
I discover, and i find that very brilliant!
Litttle question: it's possible to save the result in RTF or HTML? (>Like NotePad++ (via plugins>Nppexport>Export To Rtf)) _________________ since ahk, all is different! |
|
| Back to top |
|
 |
majkinetor
Joined: 24 May 2006 Posts: 4114 Location: Belgrade
|
Posted: Fri Feb 06, 2009 12:57 pm Post subject: |
|
|
No.
Its meaningless here, because you don't have any formating options except color. If you want to export colorised text its easy to create script that will consider Keywords.hes and produce html out of input, even rtf altho a bit harder. _________________
 |
|
| Back to top |
|
 |
DHMH
Joined: 17 Jul 2008 Posts: 194
|
Posted: Fri Feb 06, 2009 1:34 pm Post subject: |
|
|
Hi,
can you help me, please:
this | Code: | ~^F::
CmnDlg_Find(hwnd, "searchnow" )
return
SearchNow:
ControlGetText,controltxt,HiEdit1,%sourcename%
Loop,parse,controltxt,`n,`r
{
IfInString,A_LoopField,%CmnDlg_FindWhat%
{
line := a_index
StringGetPos,pos,A_LoopField,%CmnDlg_FindWhat%
HE_LineScroll(hEdit,pos,line)
;HE_ScrollCaret(hEdit)
break
}
}
return |
don't work
I´ve try to make a search function.
Your function in the example Script _Test.ahk doesn't work
Greets,
DHMH _________________ Tips & Tricks for Windows XP and Vista... only german! sorry!
German Computerboard |
|
| Back to top |
|
 |
majkinetor
Joined: 24 May 2006 Posts: 4114 Location: Belgrade
|
Posted: Fri Feb 06, 2009 1:57 pm Post subject: |
|
|
I probably broke it during modifications in CmnDlg .
Ill fix this _Test.ahk problem and repost it.
Thanks for report. _________________
 |
|
| Back to top |
|
 |
majkinetor
Joined: 24 May 2006 Posts: 4114 Location: Belgrade
|
Posted: Fri Feb 06, 2009 2:58 pm Post subject: |
|
|
OK, I fixed that error. Like I said, it was due to the fact that I changed CmnDlg to use dynamic functions instead labels, and didn't change that code in _Test.ahk
CTRL F to search, F3 to search next when you close the find dialog.
All search features work except searching upwards which I didn't implement. After all, this is only preview of features. _________________
 |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|