Forum Replies Created
- AuthorPosts
Stefan
ParticipantHi blackhawk,
me think there is no rule which keywords should be highlighted in which special color.
Just do like you want, maybe take an existing color scheme as basic to get some ideas.
There are some web pages displaying colorschemes for various languages, used by Textmade and VIM, take that for more ideas.
http://textmatetheme.com/
https://code.google.com/p/vimcolorschemetest/BTW, the highlight colors [1], [2],… can be defined in the [Display] tab as Highlight (1), Highlight (2),…
>>>” I don’t want to customize this for one language and then have all the rest look like crap.”
If you utilize “Tools > Properties for Current Configuration”, you will work
only on the settings for one syntax highlighting profile. The other languages are not affected then.
HTH?( BTW, I answered your question one hour before you actually asked it [see posting timestamps] :D )
Stefan
ParticipantStefan wrote
I hope you have planed to add “Last post at %date% %time% by %user%” behind each topic of the Recent Topics list too.
I can see this feature implemented if I browse this forum with an Android Tablet, but not with SmartPhone and Firefox on PC.
Is this still planned to implement or is this an bug?January 4, 2014 at 7:36 am in reply to: Store and Load your Favorite Find and Replace pattern #17800Stefan
ParticipantAnother tip:
To add a name or an hint to your stored regex, you can utilize “Named Groups” feature in the .Net framework syntax:
If your regex has many groups, keeping track of their numbers can get cumbersome.
Make your regexes easier to read by naming your groups
(?<name>pattern) or (?’name’pattern)
(pasted from http://www.regular-expressions.info/named.html)
We just use that “Named Group” feature to add an comment to our regex pattern,
we even utilize that “Named Group” feature without adding an regex pattern to it, but just using the comment feature.
Example:
(?<Match Two Digits>)\d\d
or
(?<Match Two Digits>\d\d)
More Examples
(?’Match Date’)\d{1,2}-\d{1,2}-\d{4}
(?<Match IP address>)\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}
If you use this feature to add an comment to your stored regular expression pattern,
you will better memorize later on what this was made for ;-)
HTH?Stefan
ParticipantMaybe this makes it into EmEditor v14? :D
Hi Yutaka,
what do you think about this feature request?
New option like “[X] Remember Last Selection”
New menu entry “Restore last Selection”
New Macro option document.selection.SelectLast();
Explanation:
If a selection is made, store the coordinates to RAM.
With “Restore last Selection” we would be able to recreate that selection again.
That is often nifty because the selection is always destroyed after we do an action.
Maybe you can even store the last coordinates to file settings?
Thank you for making EmEditorStefan
ParticipantFYI, The transfer to the new forum had removed backslashes from the code block.
..See for example last post from thread >>> http://www.emeditor.com/forums/topic/convert-special-characters-to-english-characters/
// A find'n replace using regular expression // (in selected range only). currentSelection.Replace("\n", "\n\n", eeReplaceSelOnly | eeReplaceAll | eeFindReplaceRegExp);
has become:
// A find'n replace using regular expression // (in selected range only). currentSelection.Replace("n", "nn", eeReplaceSelOnly | eeReplaceAll | eeFindReplaceRegExp);
..
..
.Stefan
ParticipantUpdate for EmEditor v14 ( See http://www.emeditor.com/text-editor-features/history/new-in-version-14/ )
.
Stefan> At the end of line I can’t make a selection to the left.
That works now..
Stefan> I also can’t move the working point (the zero-width selection line) anymore after I have typed something,
That works now. (by pressing ESC-key once to escape selection and enable “move mode”).
Stefan> * Backspace, to delete to the left, works on EOL only, not in the middle of the line.
That works now too..
Stefan> * Del, to delete to the right, works nowhere with an zero-width selection only.
That works now (after pressing DEL a second time).
Thank you Yutaka.Stefan
ParticipantThis is implemented now, see:
http://www.emeditor.com/text-editor-features/history/new-in-version-14/
The Move Line Up and Move Line Down commands were added.
By default, these commands were assigned as CTRL + SHIFT + UP and CTRL + SHIFT + DOWN.
If these shortcut keys don’t work, please go to Configuration Properties, Keyboard tab, and click Reset, or assign your favorite shortcut keys to these commands.Thank you, Yutaka.
Find me: transpose lines move line up move lines down switch lines
Stefan
ParticipantI was able to test a bit that “Enhanced Multiple Selections” feature and think it works very well.
Thank you, good work, well done.
.
All the best for the new year to you and everyone.
.
.Stefan
ParticipantHi TransUA,
to sort the lines alphabetically from A to Z, you can utilize the build-in functions from the Edit menu.
–To randomly shuffle the lines, this basic JavaScript functions should work:
//Randomly shuffle lines
//1.) select some text. 2.) execute this JavaScript macro. 3.) Done!
strSelText = document.selection.Text;
strLinebreak = “\r\n”;
arrLinesArray = strSelText.split(strLinebreak);
arrLinesArray.sort(function random(){return 0.5 – Math.random()});
arrOut = arrLinesArray.join(strLinebreak);
document.selection.Text = arrOut;Store that above as shuffle.jsee into the EmEditor folder and load it via menu Macros > Select…
Next select your text to shuffle and execute Macros > shuffle.jseeNote:
you can find discussions about “better” or faster sort algorithms in the net and exchange my random function by another one.HTH?
Stefan
ParticipantAdd
eeFindReplaceOnlyWord
.
October 31, 2013 at 1:36 am in reply to: QueryStatusByID method not working for EEID_FINDBAR_INCREMENTAL (4571) #17412Stefan
ParticipantAnd BTW, this too doesn’t work for me:
//Sets the focus to the Find toolbar editor.ExecuteCommandByID(4565);
The focus is still on document.
Sets the focus to the Find toolbar works for me only
– by utilizing a keyboard shortcut or
– by All Commands: Search > Set Focus to Find ToolbarTested with 13.0.6 portable
.
October 31, 2013 at 12:55 am in reply to: QueryStatusByID method not working for EEID_FINDBAR_INCREMENTAL (4571) #17411Stefan
ParticipantBut I get always a “2” for eeStatus, no matter if the button is in pressed state or not? :confused:
Test:
editor.ExecuteCommandByID(4571); //Toggles the Incremental Search BUTTON on the Find toolbar var eeStatus = editor.QueryStatusByID(4571); alert("eeStatus: " + eeStatus); // 2 alert("eeStatusLatched: " + eeStatusLatched ); // 4 alert("eeStatusEnabled: " + eeStatusEnabled ); // 2
The toggle command “4571” works, but we can’t get the state of that button back with QueryStatusByID().
Me think, “4571” is not the ID of that button itself, but just the ID of the toggle command.
So to answer your question beforehand, I have no glue if this increment search button itself has a own ID to get its state..
October 31, 2013 at 12:17 am in reply to: QueryStatusByID method not working for EEID_FINDBAR_INCREMENTAL (4571) #17410Stefan
Participant“EEID_FINDBAR_INCREMENTAL” is not a ID, but a string, the name of that command.
The ID is 4571
See EmEditor Help – Command Reference – Search category
Incremental Search (Find toolbar) command
Toggles the Incremental Search button on the Find toolbar.
Toggles the Incremental Search button on the Find toolbar. When Incremental Search is activated,
EmEditor will search and highlight results as the user types.How to Run
Default Menu: None
All Commands: Search > Find Toolbar > Incremental Search
Toolbar: None
Status Bar: None
Default Shortcut Key: None
Plug-in Command ID
EEID_FINDBAR_INCREMENTAL (4571)
Macros
[JavaScript]
editor.ExecuteCommandByID(4571);Also take a look in the help for EmEditor Macro Reference – Editor Object > QueryStatusByID Method
Retrieves the current status of the specified command, whether it is enabled and checked.
[JavaScript]
nStatus = editor.QueryStatusByID( nID );Parameters
nID
Specifies an integer indicating the Command ID to execute.
See the Command Reference for the list of available commands.Return Values
Returns a combination of the following values.
eeStatusEnabled The command is enabled.
eeStatusLatched The command is checked..
Stefan
ParticipantYutaka wrote:
Please see EmEditor Professional v13 New Features.
http://www.emeditor.com/modules/feature1/rewrite/tc_41.htmlFor your information, that page can now be found here:
http://www.emeditor.com/text-editor-features/history/new-in-version-13/Feedback:
That multiple selection editing if often useful to select several lines between other, unimportant lines, like here:HKLM\SOFTWARE\Microsoft\Uninstall\{D95297092}\Version=””
HKLM\SOFTWARE\Microsoft\Uninstall\{D95297092}\Language=””
HKLM\SOFTWARE\Microsoft\Uninstall\{D95297092}\DisplayName=”Registration Wizard”
HKLM\SOFTWARE\Microsoft\Uninstall\{C24F6BA0}\Version=””
HKLM\SOFTWARE\Microsoft\Uninstall\{C24F6BA0}\Language=””
HKLM\SOFTWARE\Microsoft\Uninstall\{C24F6BA0}\DisplayName=”MoS 4.6.2″
HKLM\SOFTWARE\Microsoft\Uninstall\{DE2D4A5E4}\Language=””
HKLM\SOFTWARE\Microsoft\Uninstall\{F055B0A4C}\Version=””
HKLM\SOFTWARE\Microsoft\Uninstall\{F055B0A4C}\DisplayName=”Vun 9.0 Run-Time Engine”Great.
Idea:
But now I see I can not remove mistakenly made selections, this feature is only for adding another selection.
So, while you are working on this, perhaps you can add a feature to remove individual selection. e.g. by holding the CTRL-key and clicking on an selection?Another idea:
Imagine I would select “DisplayName” in one line and press CTRL+SHIFT+A) to select all the occurrences,
next I wanted to extend all selection to select the whole lines where a selection is made.
Can there be a option to get this working? Ctrl+F8 works only for the current line.
Maybe there is a change to improve that Ctrl+F8 feature to work on all lines with an selection?Thanks for making EmEditor.
Stefan
ParticipantGreat!
That “Enhanced Multiple Selections – allows you to move multiple cursors more freely”
seems to provide even more functionality than I had dreamed off. :thumpsup:Moving multiple cursors around to another place needed modification is very nifty. Good work!
Thank you for making EmEditor.
Stefan
ParticipantHi Yutaka
Please consider to add a “Restore last Selection” option.
I think about a setting/option like “[X] Remember Selection” and a menu entry “Restore last Selection” .EmEditor should remember always each made selection for each open document, as long as there is no other selection made, or the editor is closed.
I could need that often after an operation who has destroyed my selection to just redo the selection.
Thanks for making EmEditor.
Stefan
Participant.
Show Marks (Space Tabs EOL) in Selection onlyI just realized that we can do that already at our own:
1.) Enable all (or the wanted) whitespace marks from menu “View > Marks”
2.) Go to menu “Tools > Properties for xxx Configuration”
3.) Click the [Display] tab and select “Returns, tabs, EOL”
4.) choose Text Color > Custom and set it to white
(or to your chosen background color, if not default), (of course you could also set the color to a light grey for example)
5.) close the dialog with the [OK] button
Done.Now the marks are invisible on normal work, but visible on selection only.
To reset to default, just go to that setting dialog from step 4) again and click at [Default] instead.
Thanks for making EmEditor.
Stefan
Participant.
5. Ctrl-A to Select All, then type “c”
6. Notice the Status bar now shows “CR+LF (Windows)” <– Problem hereThe Status bar now shows “CR+LF (Windows)” .
For me only if working on the first line.
And only until I press Enter one time after the ‘c’, then it switch to “LF Only (UNIX)”Tested with 13.0.5 portable.
The “Tools > Customize… > Status > Return Method” has nothing to do with this situation at all as it seems.
Maybe I just don’t get it right. Please wait for Yutaka.
.
Stefan
ParticipantHi atnak.
I don’t know details, but perhaps check out if this help entry will solve your issue:
EmEditor Help – Dialog Boxes – Configuration Properties > General tab
Preserve (CR/LF) returns on Clipboard check box
If this box is checked, the return methods will be preserved at copy and paste.
For instance, the LF only returns will be copied and pasted to another location with LF only returns..
Stefan
ParticipantUpps, now the Edit “button” is missed from my post?!? So I post a new one:
Little problem:
If I click at a number link to go to the next page of Recent Topics, I am at the top of the forum side and have to scroll down to the Recent Topics list.Suggestion:
have an anchor at the top of the Recent Topics list and jump to that link, so I can start reading at the next page, without scrolling first..
Stefan
ParticipantThanks for bringing back big “Recent Topics” list!
I hope you have planed to add “Last post at %date% %time% by %user%” behind each topic of the Recent Topics list too.
.
Stefan
ParticipantGood example of utilizing “OutputBar”, thanks.
If you are interested, you can modify your script with some details like shown here:
// do not update the screen during our work: Redraw = false; // get and store current cursor position: yPos = document.selection.GetActivePointY( eePosLogical ); xPos = document.selection.GetActivePointX( eePosLogical ); // ask the user: var strAnswer = prompt( "find what ?", "\\w+" ); // do the work; search for occurrences: var count=0; while ( document.selection.Find( strAnswer, eeFindNext | eeFindReplaceRegExp) ) { count++; } // provide the result to the output bar: OutputBar.Clear(); OutputBar.writeln( "find count for \"" + strAnswer + '\" after column ' + xPos + ' of row ' + yPos + ': ' + count ); OutputBar.Visible = true; OutputBar.SetFocus(); // erase search highlighting: document.HighlightFind = false; // go back to origin cursor position: document.selection.SetActivePoint( eePosLogical, xPos, yPos, false );
Keep up! ;-)
Stefan
ParticipantYou may want to try this script on COPIES of your srt subtitles files.
1.) save this script as a textfile with JS extension or as a snippet to the snippet plugin.
2.) load your srt file
3.) execute that script one time for every line to modify. The script will tell you if nothing more is found.If this works and you have saved this script to a file, you can utilize menu “Macros > Run wit temporary Options…” to let it run more than one time at once.
This script will:
1.) Find line with leading dd:dd:dd,ddd
2.) Check if last non-blank sign of next line is a dot
3.) If not empty, get content of next line
4.) If dot was found above; replace first char to upper case, else to lower caseRedraw = false; //we use a RegEx search pattern to match first time from strings like: "00:02:59,203 –> 00:03:01,906" foundcount = document.selection.Find("^\\d\\d:\\d\\d:\\d\\d,\\d\\d\\d\\s",eeFindNext | eeFindReplaceRegExp); if(foundcount){ //if line starts with something like "00:02:59,203 ", then go one line down: document.selection.LineDown( ); //get the last sign of thatline: LineContent = document.GetLine( document.selection.GetActivePointY(eePosLogical) ); LineContent = LineContent.replace(/\s+$/,""); LastSign = LineContent.slice(-1); //go again one line down: document.selection.LineDown( ); yPos = document.selection.GetActivePointY( eePosLogical ); LineContent = document.GetLine( yPos ); //if that line is not empty ("If a row of subtitle have 2 lines"): if(LineContent.length > 0){ //if the last sign was a dot: if(LastSign=="."){ //be sure first char is upper case: OUT = LineContent.slice(0,1).toUpperCase() + LineContent.slice(1); }else{ //be sure first char is lower case: OUT = LineContent.slice(0,1).toLowerCase()+ LineContent.slice(1); } //replace origin line content: document.selection.SelectLine(); document.selection.text = OUT + "\n"; } } else alert("Search pattern not found."); document.HighlightFind = false;
HTH?
Stefan
ParticipantNew Forum 2013: now at last some more details for ‘Recent Topics’ overview added, great improvement, thanks!
.
Stefan
Participantif I do a search for,
<br in.*>
it should just grab the tag <br indentlevel…> correct?
Well, it is grabbing everything all the way to the end of line and leave the last tag there.
Any thoughts on this one? Thanks.Please note that regex multiplier like plus and star works greedy in mostly every regex engine, so here too.
Use the non-greedy , frugal switch ‘?‘ to get what you are after:
<br in.*?>
.
- AuthorPosts