- AuthorPosts
- February 8, 2009 at 8:09 am #6893
Pancho
MemberHello
I need go and Highlight function by name.
1. Select text : ‘HLfunc’
2. run Macro
3. go to line which contains ‘function HLfunc ‘Help or advice please
I tried example:
wnd = FindWindow( "EmEditorView", "" );
str = wnd.Caption;
name = document.selection.Text;
pat = 'tions+'+name;
rgx = new RegExp(pat,'i');
results = str.search(rgx);
alert( 'pat: '+pat+"nresults: "+ results);
//function HLfuncFebruary 9, 2009 at 3:50 am #6897Yutaka Emura
KeymasterPancho wrote:
Hello
I need go and Highlight function by name.
1. Select text : ‘HLfunc’
2. run Macro
3. go to line which contains ‘function HLfunc ‘Help or advice please
I tried example:
wnd = FindWindow( "EmEditorView", "" );
str = wnd.Caption;
name = document.selection.Text;
pat = 'tions+'+name;
rgx = new RegExp(pat,'i');
results = str.search(rgx);
alert( 'pat: '+pat+"nresults: "+ results);
//function HLfuncYou should be able to do this by using the Find method (of the Selection object) with eeFindReplaceOpenDoc parameter to search all open documents.
Alternatively, you can use the Projects plug-in to enable symbol list, and press F12 to jump to the definition of a symbol at the cursor.
February 9, 2009 at 6:39 am #6899Pancho
MemberYou should be able to do this by using the Find method (of the Selection object) with eeFindReplaceOpenDoc parameter to search all open documents.
I do not want search to all open documents, only active(current document)
How to get all text document in Selection object ?
document.selection.SelectAll();
str = document.selection.text;right ? As without the allocation of the entire text (like Ctrl+A) ?
February 9, 2009 at 7:41 pm #6900Yutaka Emura
KeymasterPancho wrote:
You should be able to do this by using the Find method (of the Selection object) with eeFindReplaceOpenDoc parameter to search all open documents.
I do not want search to all open documents, only active(current document)
How to get all text document in Selection object ?
document.selection.SelectAll();
str = document.selection.text;right ? As without the allocation of the entire text (like Ctrl+A) ?
If you just want to search for selected text (or a word if not selected), how about pressing CTRL + F3? To do this with a macro, you can use:
document.selection.FindRepeat(eeFindRepeatNext | eeFindRepeatWord);
February 10, 2009 at 5:07 am #6903Pancho
Membernot quite so … please see image:
February 10, 2009 at 5:26 am #6904Pancho
MemberThis really work :-) ehaaaaa
str = ‘functions+’+document.selection.Text;
document.selection.Find(str,eeFindNext | eeFindAround | eeFindReplaceRegExp);Thanks for advises !!
- AuthorPosts
- You must be logged in to reply to this topic.