Forum Replies Created
- AuthorPosts
Yutaka Emura
KeymasterI wrote the macro for you:
http://www.emeditor.com/modules/newbb/viewtopic.php?topic_id=682&forum=19
Yutaka Emura
KeymasterI have 1 million line US-ASCII text (80.9MB), and the content is:
1-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
2-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
3-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
...
I replaced “abc” with “XXXXXXXXXX”. That means there are 2 tokens in each line to replace when case matching, or 3 tokens when no case matching, total of 2 (or 3 ) million tokens in the entire file. The host is Windows XP SP2 (English) in Virtual PC 2007 (within Windows Vista 64-bit Intel Core 2 Quad Q6600, 8GB RAM). All software programs are freshly installed.
Here is my result:
Textpad 5.2.0 32-bit
No case matching: 34 sec
Match case: 22 secNotepad++ 4.7.5
No case matching: 10 min 3 sec
Match case: 6 min 32 secEmEditor Professional 7.00.5
No case matching: 9 sec
Match case: 5 secThus, EmEditor Professional was the fastest of all these three. I also found something noteworthy: Only EmEditor allows you to cancel replacing during the operation. Other programs do not allow you to abort once you hit “Replace All” until the operation is finished. TextPad does not allow you open Unicode files (such as Japanese characters) correctly (it opens but converts Unicode characters into a substitute character “?”). I wanted to compare Unicode files, but couldn’t because of this.
I don’t know why you have the different result. Maybe because you have only a few tokens to replace, or your file might be encoded in a different encoding. This is the reason it would be more helpful if you could email me your sample file so I can reproduce your issue. Is your Windows system encoding English? (You can find out from Control Panel > Regional Language Options > Advanced tab – “Language for non-Unicode programs”)
Yutaka Emura
Keymasterprashob12 wrote:
I tried to use the macro script for replacement in all the files.below is the sample, here i am getting some error report for closing of “)” at sandeep, “D:PRASHOB, can you please tell me exactly where i am making the mistake.
editor.ReplaceInFiles( “prashob”, “sandeep, “D:PRASHOBLY-01juriontesttest2*.xml”, eeReplaceBackup, eeEncodingSystemDefault, “”, “D:PRASHOBLY-01juriontesttest2backup” );
” is missing after sandeep
editor.ReplaceInFiles( "prashob", "sandeep", "D:PRASHOBLY-01juriontesttest2*.xml", eeReplaceBackup, eeEncodingSystemDefault, "", "D:PRASHOBLY-01juriontesttest2backup" );
Yutaka Emura
KeymasterSteveH wrote:
I’ve never been completely comfortable with the way EmEditor handles current line highlighting and feel it would be be more logical to always have the current line highlighting always in the foreground.I would prefer if it the highlighting was not broken up with other elements such as string highlighting or URL highlighting as shown in this example.
You can use “Transparent” as background color for URL and highlighting strings. To do this easier, start from “EmEditor Standard” as the Theme (if “EmEditor Classic” was selected), and then start customizing Current Line background.
Yutaka Emura
Keymasterprashob12 wrote:
IS ANY ONE THERE TO SOLVE MY QUERY.I NEED TO KNOW WHETHER MULTIPLE REPLACMENT IS POSSIBLE OR NOT
SOLVE MY QUERY PLEASE.
I posted two samples
Replace All – mulitple times
http://www.emeditor.com/modules/newbb/viewtopic.php?topic_id=675&forum=19Replace in Files – multiple times
http://www.emeditor.com/modules/newbb/viewtopic.php?topic_id=676&forum=19Once these macros are included in your My Macros list, you can assign these macros to any shortcut keys or toolbars.
The All Documents checkbox in Replace dialog box — I will consider that feature in future versions. For now, you can use a macro to do that job. Thanks!
Yutaka Emura
Keymasterthylocene wrote:
As I said, my settings were out-of-the-box.Search and replace string did not include regex
ex. Replace AND with XXXXXXXXXX
Pretty simple
My environment is Vista 64-bit, but I do not think that has anything to do with it since the other programs are 32-bit as well so some thunking should be taking place.
I have 1 million line text (81MB), and did a simple replace (Replace “abc” with “XXXXXXXXXX”). In my machine it took about 8 seconds (when “Match Case” is off), and 3 seconds (when “Match Case” is on). Is this comparable to your results? You might want to try “Match Case” on, since this changes the speed dramatically. I will still look into more details. Thank you!
Yutaka Emura
KeymasterReplace command will not be recorded automatically.
This is what you need:
// JavaScript
docs = new Enumerator( editor.Documents );
for( ; !docs.atEnd(); docs.moveNext() ){
doc = docs.item();
doc.Activate();
doc.selection.Replace( "abc", "def", eeReplaceAll );
}
Yutaka Emura
Keymasteruser wrote:
helloCTRL+D deletes all the previous characters (from the position of the cursor), but only inside the same line
can I make another key combination to delete all the previous text (all lines and characters)?
thanks
CTRL + SHIFT + HOME, and then DELETE
If you would like, you can record this combination to a macro.
May 1, 2008 at 12:58 am in reply to: Opening unicode2hex.js produces a message about null spaces #5736Yutaka Emura
Keymastermaynard wrote:
unicode2decimal.js works, but unicode2hex.js is still broken.It is OK now. Make sure you clear cache on your browser before you download again.
April 30, 2008 at 9:39 pm in reply to: Opening unicode2hex.js produces a message about null spaces #5733Yutaka Emura
Keymastermaynard wrote:
I downloaded a couple of macros, but, every time that I try to run one on my test file (.h in UTF-8), I get an “error in line 1” message. I notice that the .js files start with a BOM and are rife with nulls. :-(I am sorry. Those files were corrupted, but I have just fixed those. Thank you for reporting the error.
Yutaka Emura
Keymasterprashob12 wrote:
Is it possible to sort number or text in ascending or descending order.I downloaded some pluggin called sortnumber500s.zip and copied all it content to my pluggin folder, but I dont see any option or icon for this when i open my editor.
Please help me in this
Thanks!!!!
You downloaded the source code of the plug-in. You will need to download the built versions either at:
http://www.emeditor.com/modules/mydownloads/viewcat.php?cid=4 (32-bit)
http://www.emeditor.com/modules/mydownloads/viewcat.php?cid=5 (64-bit)After installed, the plug-in should be found in the Plug-ins toolbar, or on the Tools menu > Plug-ins.
Yutaka Emura
Keymasterprashob12 wrote:
HelloooIs there is any option in the editor to have Extend Selection
When we do ctrl+F (Find) is the tool capable of doing the extendable selection,
Also in Ctrl+G (Go to the line)Before emeditor i used to use Textpad having these functions in the textpad is of great help as it comes very useful to find something from one point to the another,
This comes very useful when recording the macro also.Is it possible with the Emeditor then please let me know.
Thanks
You can press F8 before searching or jumping, so the selection becomes the keyboard selection mode. I hope this helps.
Yutaka Emura
Keymasterprashob12 wrote:
hello AllI am new to the forum
Is it Possible to view the file name of open documents in the editor in a list format.
now if i open multiple documents its all coming on top of the window. this way its confusing to identify a particular documents. It would be helpful if i can view it in a list format.
:-(
Did you check “Open Documents” plug-in?
Yutaka Emura
Keymasterthylocene wrote:
Hi
The size of the text file is around 26 Mb (around 119,000 lines). EmEditor settings are out-of-the-box. In all cases each editor I have tested is with the same file, window size etc,etc.I am trying to reproduce your issue, but please let me know more details:
– what is your search term?
– “Match Case”, “Escape Sequence”, “Regular Expressions”?
– Did you select “Wrap by Window” or “Wrap by Characters”?
– If possible, please email me a sample file (after zipped) at [email protected]
I will try to reproduce, and will cerntainly try to fix your issue.
Thank you.
April 28, 2008 at 11:24 pm in reply to: Properties of All Configurations – transfer to another PC #5722Yutaka Emura
Keymasterbennett wrote:
Dear Yutaka,In Tools > Properties of All Configurations > Highlight (1) I have at least 60 words or expressions listed for highlighting. Works perfectly. Is there a way of transferring these setting to another machine. I’ve a file with the words highlighted. However, when I transfer the file to another machine, the highlights disappear. Is there a way of transferring the settings in Tools > Properties of All Configurations > Highlight (1) to another machine. We have four registered copies of EmEditor Pro.
Many thanks.
bennett
Use “Import and Export Wizard” you can find on the Tools menu. In this wizard, select the first item “Export all personal settings into a file.”, and in another machine use “Import all personal settings from a file.”
Yutaka Emura
Keymasterileadu wrote:
Java compile
Customize Tools Setting
http://cdwww.twbbs.org/albums/ileadu/aag.png
\%WinDir\%system32cmd.exe
$(Path) /k “C:Program FilesJavajdk1.6.0_06binjavac.exe” -Xlint $(Filename).java
$(Dir)
C:Program FilesJavajdk1.6.0_06binjavac.exeEmeditor 7.00.5
When I checked “Use Ouput Bar”, to compile is very long time.
But I unchecked it, it’s immediateEmeditor 6.00.4
When I checked “Use Ouput Bar”, to compile is immediate.I think that it may be a bug or not be optimized.
If you want to use Output Bar, you should specify only the executable (in this case, “C:Program FilesJavajdk1.6.0_06binjavac.exe”) in the Command text box, and the arguments in the Arguments text box. You don’t need to specify cmd.exe anywhere.
Yutaka Emura
Keymasterthylocene wrote:
Hi
I have downloaded an eval copy of the EmEditor to compare against other editors (I am looking for a good fast replacement for notepad). Whilst I can see great potential in the program, I am finding it a bit slow when compared to other products that I have tried such as textpad, notepad++, etc. for things like paging through large text files, search and replace etc. For example textpad is 2 x to 3 x faster at search and replace and much faster at paging.My question is do you guys aim to address this in the near future?
First, a few simple questions: What is the typical size of text file you are trying to page or search/replace? Have you changed any settings on the Advanced tab of the Customize dialog box (on the Tools menu)? We certainly want to optimize the speed in all cases.
Yutaka Emura
KeymasterwOxxOm wrote:
it is not checked.I cannot reproducd your problem. Please email a sample file with detial procedure how to reproduce your problem.
Yutaka Emura
Keymasteryongfa365 wrote:
:-?
Macro or “Word Count” all ok I can do itHowever, no integrated directly into the Find / Replace box on the convenience
Then use the macro or “Word Count” plug-in. I don’t know why you want to add another extra feature to the Find/Replace dialog box just to increase the size of the core program “emeditor.exe”. The macro and plug-ins will not bloat the program, but the Find/Replace dialog box will bloat the program.
Yutaka Emura
Keymasteryongfa365 wrote:
sometimes when I search a string
I want to know its Match Count onlyeg:
str=”我是柳永法 http://www.yongfa365.com “
search d
Match Count : alert(“3”)this is very useful in large file
the 7.0.0.5 “Word Count” is OK
However, I search the characters are changed from time to time, if this feature added to the Find / Replace box will be very convenient
I see. Since you are using a macro, there are many built-in functions available within JavaScript and VBScript you can count certain characters.
April 25, 2008 at 3:59 pm in reply to: AutoComplete plugin – Please make it closer to the "snippet" function in Visual Studio #5705Yutaka Emura
Keymasterjonhutch24 wrote:
Sorry, let me show you an exampleLet’s say I make a snippet and it looks like this (this is just in theory):
if $con1$ = $con2$ then
$expression$
end ifNow when I run the snippet I’d like $con1$ already highlighted so I could just write over it, and when when I hit the tab key, it would move to $con2$ and highlight it so I could write over it, and when I hit tab again it would move to $expression$ and highlight it so I could type over it.
So my typing would look something like this:
Run the snippet
var1 -> TAB -> 23 -> TAB -> writeline(“It’s 23!”)and the text editor in the end would have:
if var1 = 23 then
writeline(“It’s 23!”)
end ifdoes this make any more sense? Sorry, I’m not very good at explaining things some times… :-?
Yes, that makes a perfect sense. Thanks!
Yutaka Emura
KeymasterwOxxOm wrote:
7.0.4
goal: find items with Actor = Style
regex: ^Dialogue: (.+?),(.+?),(.+?),(.+?),4,
supposed match: Dialogue: 0,0:00:16.70,0:00:17.64,Naga,Naga,0000,0000,0000,,text
Wrong match found by EmEditor: 0,0:00:16.70,0:00:17.64,Naga,Nagasumi,0000,0000,0000,,textregex S&R in Files, 1
regex: ^Style: (.+?),.+?,(.+?),(.+?),(.+?),(.+?),(.+?),.+?,(.+?)$
replace: Style: 1,Tahoma,2,3,4,5,6,-1,7
enabled options: *.ass, UseRegEx, ConfiguredEncoding
result: replaces in one file then crashes applicationS&R in Files, 2
if KeepModifiedFilesOpen is enabled then only 1-3 of matching files in the folder are modified. When the option is disabled then all the files are correctly modified on-diskI don’t have any problems with 7.00.5
Make sure “Regular Expressions Can Match New Line Characters check box” is not checked in the Search tab of the Customize dialog box.
Yutaka Emura
Keymasteryongfa365 wrote:
sometime this is very usefulI am not sure exactly what the Match Count is, but the new Word Count plug-in included in Version 7.00.5 allows you to define the number of characters or lines matching specified regular expressions.
Yutaka Emura
KeymasterPaperPlate wrote:
Yutaka wrote:
I don’t know what you mean by “activate a tag”. If you want to select a certain document (tab), then you can do using Documents colleciton and Document.Activate method.When you do a “Find in Files” or, use the FindAll.vbee macro, the output in the new tab is formatted with a tag (a link to the file and the line of that file) with a display of the line it found the search parameter on.
I am wondering if its possible to activate (click) this tag in a macro to jump to that line in the original file.
Yes, you can use the Tag Jump command.
http://www.emeditor.com/help/cmd/edit/tag_jump.htm
editor.ExecuteCommandByID(4147);
Yutaka Emura
KeymasterPaperPlate wrote:
I’ll just ask it as a bunch of questions, since I did kind of ramble! I did mean the find all macro you listed, though I did retool it a bit (and rewrote it in .js, that is where the confusion came from).1) Is it possible to delete a file using EmEditor macros?
2) Or, possible to delete a file using a plugin?
3) Can the macro module activate a “tag” in a document?Let us say I use the FindAll.vbee macro in the following file using the search string, “if”
If a == b
ElseIf b > 1
Message “Hello world!”
End
End // If
#—-FindAll would give me:
c:/filename/etc/etc/etc.etc(1): If a == b
c:/filename/etc/etc/etc.etc(2): ElseIf B > 1
c:/filename/etc/etc/etc.etc(5): End // IfNow lets say I edited the text that was displayed after I did the FindAll, on line two to (since “Hello world!” would never message with the current logic):
“c:/filename/etc/etc/etc.etc(1): If a != b”
After running the new macro it would compare your original file to the FindAll output you editted, then replace the lines you edited back into your original file, using the tags as references.
Long post but, is this possible with EmEditor?
Yes, you can use DeleteFile Method of FileSystemObject.
http://msdn2.microsoft.com/en-us/library/thx0f315(VS.85).aspx
See also http://www.emeditor.com/help/macro/tutorial/tutorial_copyfile.htm
if( document.FullName == '' ){
alert( "The file is untitled." );
}
else {
fso = new ActiveXObject( "Scripting.FileSystemObject" );
fso.DeleteFile( document.FullName );
}
I don’t know what you mean by “activate a tag”. If you want to select a certain document (tab), then you can do using Documents colleciton and Document.Activate method.
The FindAll output you edit will not be reflected automatically.
- AuthorPosts