Forum Replies Created
- AuthorPosts
Stefan
ParticipantJohnQSmith wrote:
Off topic…Stefan,
What utility are you using to create your animated GIF demos?
Thanks
JohnQSmithMy current simple method is just this:
* screen shots: Alt+Print
(for including mouse cursor and auto-save: WinSnap’s last freeware version, or IrfanView too)* picture modification(paint/text): IrfanView’s Paint-plugin or just msPaint
* Gif Anymator:
currently Gif-X 2.5 (free, portable, simple)
Workflow: New, Import all pics, set delay ms, export as GIF, done!In the past i had used:
– Ulead GIF Animator 2
– Microsoft GIF Animator
They are both very old and can be found via google too (tip: encoderX forum)Stefan
ParticipantThanks user. Sorry, I missed this reply somehow.
I just want to share an idea i had for 30 minutes.
Customizing the menu to add your own menu items.* Tools > Customize Menus…
* choose here e.g. ‘Main Menu’
* click at the last item: ‘&Help’
* click at [Insert Below]
>> (o)Popup, Name: ‘MyMenu’
>> [OK]
* click at the last item: ‘MyMenu’
* click at [Insert Right]
>> (o)Command
>> Category: My Macros
>> Commands: TextApe.jsee
>> [OK]
> [OK]You should have an new main menu entry ‘MyMenu’ now after ‘Help’:
Stefan
ParticipantI know what you mean:
but i don’t know how EmEditor will aid you here.
.
Stefan
ParticipantYou can make the Outline plugin do what you want:
* open the outline plugin, e.g. via “Tools > Plugins”
* right click into the plugin panel
* chose Properties
* see EmEditor Help – How to – Plug-insand perhaps that for an better understanding:
http://www.emeditor.com/modules/feature1/rewrite/tc_30.html
(especially the video)
http://www.emeditor.com/modules/feature1/rewrite/tc_36.html
(scroll down to ‘Outline’)Stefan
ParticipantIs there a macro way to add/delete a configuration?
If you mean to “modify” an configuration,
then yes, search the help or the forum for “cfg.”Or take a look at “Snippets-plugin > General > Toggle Line Numbers”
cfg = document.Config;
cfg.General.ShowLineNumbers = !cfg.General.ShowLineNumbers;
cfg.Save();
.
Stefan
ParticipantHi shrey, welcome.
1.) Normal that is done by pressing Ctrl+F3 (Shift+F3 for backwards)
BTW, It is enough to have the cursor on an word or sign.
No need to select something.
This works even for signs like “=” without selecting first.2.) Since that is an kind of an search,
all other occurrences are highlighted too.See “Tools > …Config.. > [Display] Search String” for settings.
And with “Search Colors [ 1]” you can even set to highlight
more then just the last search but the last two, or three, or…3.) To remove that current highlighting from view, press Alt+F3.
Example:
Having the cursor somewhere inside of the word “sc|ript“.
Pressing now the key combination “Ctrl+F3”
will jump to the next occurrence of that word
AND search-highlight all occurrences of that word in the whole document.Pressing “Shift+F3” jumps backwards to the last occurrence.
Pressing “Alt+F3” will remove the highlighting from view.
<script src='xxx/scripts/shCore.js'></script>
<script src='xxx/scripts/shBrushCpp.js'></script>
<script src='xxx/scripts/shBrushCSharp.js'></script>
HTH?
BTW: to highlight some words on demand, you may want
to take an look at MARKERS > http://www.emeditor.com/modules/feature1/rewrite/tc_39.html.
Stefan
ParticipantFound two examples and have taken an screenshot (see post above)
to better explain what i mean.I mean this feature to preview the documents only.
To edit them i use an double click to open them for modifying.Stefan
Participant//NEW, Di, 10.07.2012: error handling for BOF and EOF
I have seen an problem when the paragraph was
at the beginning of the file, with no empty
line above it. And the same at the end of file
if there was no empty line following.So my improved macro detect this and handles accordingly:
// language = "JavaScript"
// Select whole paragraph macro.
// An paragraph is an block of text delimited
// by two empty lines. (Or BOF/EOF)
// How to:
// 1. Have the cursor inside an paragraph.
// 2. execute this macro.
//NEW, Di, 10.07.2012: error handling for BOF and EOF
o = document.selection;
nFound = o.Find("^s*$",eeFindPrevious | eeFindReplaceRegExp);
if(nFound==0){o.StartOfDocument(); o.StartOfLine();
yPosBeg = o.GetActivePointY(eePosLogical);
}else{
yPosBeg = o.GetActivePointY(eePosLogical) +1;
}
nFound = o.Find("^s*?$",eeFindNext | eeFindReplaceRegExp);
if(nFound==0){o.EndOfDocument(); o.EndOfLine();
o.SetAnchorPoint(eePosLogical, 1, yPosBeg);
}else{
o.LineUp();o.EndOfLine(); //exclude trailing line break
o.SetAnchorPoint(eePosLogical, 1, yPosBeg);
}
Stefan
ParticipantHi Bob, welcome.
BB> if there is a config specifically for apex?
I think not.
You can take an look yourself at > Library > Syntax Files.
But maybe someone will jump in and share his config?But please note that you can modify
an existent config to your needs
if you know the details of APEX:menu “Tools > Select Configuration > Define Configurations…”
For example
* select the XML configuration and press [Copy]
* Rename the copied config by entering “APEX”
* Press the [Properties] button for fine tuning.Once you are satisfied you may want to share them with us?
See your “eeConfig.ini”Stefan
ParticipantYou can sort by column in EmEditor
while you are in “Separated Values” mode.1.)
Therefor you have to delimiter your columns first by either
* one tab (t) => TSV mode
* one coma (,) => CSV mode
* one own delimiter => DSV mode ( e.g. one “:” or “|” or “;” or one space ” ” or…)Hint: For your examples
RegEx Search for three-or-more spaces
and replace by an coma:
Find: s{3,}
Replace: ,
[X] Use Regular Expressions
Now you have CSV.2.)
Next switch to delimiter mode via
menu “Edit > Separated Values/Sort > selecting-your-mode”For your case use CSV if you have followed the s&r tip.
Hint: you must seen some thin vertical lines.
3.)
Then click into an column and use an Sort mode.Explanation:
CSV means “Coma Separate Value” and you
must have an coma between your columns.
There must be NO coma inside the column itself!TSV means “Tabulator Separated Value”
and the same is valid as said for CSV.DSV means “Defined(by user) Separated Value”
and you have to set the delimiter yourself
e.g to ‘;’ or ‘|’ or something like that.
To setup the DSV delimiter go to menu
“Tools > Properties for X”
and at the [File] tab
set the “Delimiter [; ]”Since spaces can sophisticate the sorting
be sure to have no, or at least the same
amount of spaces around your delimiter.
(Your example lines have uneven amount
of spaces between the columns)Please note that you can also right click
the ruler to get the “Separated Value” menu.HTH?
For more read the help or visit
http://www.emeditor.com/modules/feature1/rewrite/tc_35.html#csv
http://www.emeditor.com/modules/tutorials4/index.php?id=35Stefan
ParticipantDon’t know,
but maybe “Tools > Plug-ins > Open Documents”
could be an handy feature for your issue?.
Stefan
ParticipantUpps :-o
F8 works already as needed
for my suggestions No.1 and No.2 from my initial post above!
(It’s even kinda “sticky selection” (No. 3), but not really)How to:
– press F8 to set the starting point of an selection
– now use one (or more) of this movements:* Ctrl+G GoTo e.g. Line 34
* Ctrl+F Find e.g. an word or an sign.
Or RegEx ^$ to find next blank line (select paragraph)
Tip: Even F3 works after F8. (e.g. Ctrl+F8 ,then F3)* F2 go to next bookmark
* Shift+F2 go to prev bookmark* use Arrow keys
* or just click somewhere else
And voila, all between is selected now.
You can even extent the selection by using
the same or an another moving command again.There are some more F8 commands:
* Select Character command – F8
* Select Line command – CTRL+F8
* Select Vertically command – CTRL+Shift+F8
(it’s a little bit tricky with bookmarks, but works:
– press CTRL+Shift+F8
– select the wanted columns at the first line
– be sure to remember the end column number at the right(e.g.: 35)
– go to next boomark (F2)
– the selection line is at column 1 (the selection is
at the left side of the start column.)
– use now Ctrl+G to go to the remembered column ’35’ in this example.
Or just use the right arrow key.)Read more about in the help:
EmEditor Help – Command Reference – Edit categoryHTH?
EDIT
Sure enough, of course now i find this info everywhere:f.ex. here:
EmEditor Help – How to – Edit > To Select a Portion of a Document
Click at the beginning of the selection, move the mouse to the end of the selection while holding the left mouse button down, and then release the mouse button.
Tips
Alternatively, press arrow keys while pressing the SHIFT key.
Alternatively, press the F8 key, and then press arrow keys.
To select lines, click on the left edge of the window, or press CTRL + F8.
To select vertically (in a rectangular block), use the mouse to select while pressing the ALT key, or press SHIFT+ CTRL + F8.And here >
http://www.emeditor.com/modules/newbb/viewtopic.php?topic_id=669&forum=2Stefan
Participantuser wrote:
how do I enter the “EmEditor” command in context menu, because it’s missing now
thanks!
If one would use the help > Search tab: search for “context”
One would find:
– Dialog Boxes
– Customize dialog box (found e.g. at Tools menu)
– Shortcut tab
– [More Shortcuts…]
[X] Add a shortcut to the Context Menu on Explorer check box.
Stefan
ParticipantAgain seen an use for this.
IF
we get “Sticky Selection”
AND
an Shortcut to Start an Selection / End the Selection
THEN
it would be nice to also get
an shortcut to duplicate an selection :-Dimagine this work flow:
– type something
– “Start an Selection”
– type ABC
– “End the Selection”
– enable “Sticky Selection”
– type something
– duplicate the selection
(which is ABC here only, but can be an larger string also).
Stefan
ParticipantIf you will implement this improvement (Arrow and Home/End keys can move vertical line)
for the zero-width selection mode……then i have an another suggestion to make the creating
of that vertical selection line more easy (for handicapped users)– make an normal line selection
– press an hotkey like Ctrl+Shift+L (or use an menu command) to switch to zero-width selection modeThat way there is an zero-width selection created at pos. 0 on all before selected lines.
Now we can use the arrow or end -key to move the vertical line.
.
May 16, 2012 at 11:49 am in reply to: delete all lines that match any of the regexes that are in a txt file #10361Stefan
ParticipantHaving e.g. “c:tempnumbers.txt” with one number at each line.
c:tempnumbers.txt:
123
222
345Use an code like this to read this file into an array.
Then use a FOR loop to process each array indices (0 till highest index)
and inside the FOR loop use the current index to do what you want.
// 1.) helper code to read an files content
//Your file with the numbers, each at an own line:
NumbFile = "c:tempnumbers.txt";
//============================================
fso = new ActiveXObject("Scripting.FileSystemObject");
oFile = fso.OpenTextFile(NumbFile, 1, false, 0);
content = oFile.ReadAll();
oFile.Close();
fso = null;
//alert(content);
//============================================
// 2.) the needed code itself
//For Each Line In Lines Do:
LinesArray = content.split("n");
for (LineNumb = 0; LineNumb < LinesArray.length; LineNumb++){
//do here what you want...
bAnswer = confirm( LinesArray[LineNumb] );
if (bAnswer == false){break;}
}
For more about Javascript FileSystemObject and text files read e.g.:
http://www.ezineasp.net/post/Javascript-FSO-OpenTextFile-Method.aspxStefan
ParticipantI think that’s commonly called “Code Folding” (or “Text folding”)
And it is called Outline by EmEditor.
EmEditor Help – How to – Plug-ins – Use Outline Plug-in
The Outline plug-in is installed by default with EmEditor Professional.
There are two major functions in this plug-in:
1.) Outlining in the custom bar
A tree view appears when you click the on the Plug-ins bar.
Or on the Tools menu, point to Plug-ins, and then click Outline.
In the Outline custom bar, the outline appears as a tree.
…2.) …
[To customize the plugin] right-click on the Outline button on the Plug-ins bar, select Properties, …
Find me: “Code Folding” “CodeFolding” “Code-Folding” “Code-Faltung” “Text folding” “Textfolding” “Text-folding”
From Wikipedia, the free encyclopedia
Code folding is a feature of some text editors, source code editors and IDEs that allows the user to selectively hide
and display sections of a currently-edited file as a part of routine edit operations. This allows the user to manage
large amounts of text while viewing only those subsections of the text that are specifically relevant at any given time..
May 15, 2012 at 5:16 pm in reply to: delete all lines that match any of the regexes that are in a txt file #10357Stefan
ParticipantIf it allowed to match ANY number between ‘918’ and ‘1884’ ?
Then try:
for ( Numb = 918; Numb <= 1884; Numb++){
document.selection.Replace("^" + Numb + ".*$", "", eeFindNext
| eeFindReplaceRegExp | eeReplaceAll);
}
Or the showed numbers only?
.
Stefan
ParticipantSeen again:
“Sticky Selection” is also nifty
if your macro/script do an selection
and you want to move around in the
document to see the start or end
of the selection.Therefor alone it would be nice to
have an command “Sticky Selection”
as last command in your macro..
Stefan
ParticipantIn the meantime i can help me with an macro.
– find/go to the wanted start position for the selection.
– set an bookmark (toggle: Ctrl+F2).
– find/go to the end position of the wanted selection.
– execute this macro:o = document.selection;
EndLine = o.GetActivePointY( eePosLogical );
document.selection.PreviousBookmark();
o.SetActivePoint( eePosLogical, 1, EndLine, true );The same but wiith explanations:
////Returns the line number of the cursor position:
yPosEndLine = document.selection.GetActivePointY( eePosLogical );
////Goes to the previous bookmark in this document:
document.selection.PreviousBookmark();
////Sets the cursor position:
////bExtend: Optional. Determines whether to extend the current selection.
////If bExtend is true, then the active end of the selection moves to
////the location while the anchor end remains where it is.
////Otherwise, both ends are moved to the specified location.
bExtend = true;
xPos = 1;
document.selection.SetActivePoint( eePosLogical, xPos, yPosEndLine, bExtend );
Stefan
ParticipantThe same (and more) as pop-up menu:
For example you can just press “Ctrl+Alt+M” + a
to “Remove empty lines (incl. whitespace) – in Selection”As explained here
http://www.emeditor.com/modules/newbb/viewtopic.php?viewmode=flat&topic_id=1879&forum=19you can create your own menu in EmEditor, here e.g. an pop-up menu.
To create your own pop-up menu follow this steps:
1. Copy the below code into EmEditor and Save as e.g. myMenu.jsee
2. Execute menu “Macros > Select This” to add this macro to My Macros
3. Assign an keyboard shortcut to launch this pop-up menu
// Tools > Properties for all configurations > [Keyboard]
// Category: My Macros
// Commands: myMenu.jsee
// Press new shortcut key: e.g. Ctrl+Alt+M
// [Assign]
// [OK]Now do:
– open an test file
– make an selection or press Ctrl+A
– e.g. press “Ctrl+Alt+M a” to “Remove empty lines (incl. whitespace) – in Selection”Here is the macro code:
//EmEditor TextApe :-)
//v0.01, 14. Mai 2012, Stefan, First tests
//v0.02, 15. Mai 2012, Stefan, First public beta release
//v0.03, 22. Mai 2012, Stefan, Wording: Blanks>Whitespace, some optimizations
//Found at:
//http://www.emeditor.com/modules/newbb/viewtopic.php?topic_id=2033&forum=19&post_id=6625#forumpost6625
//Initial work:
init();
//Build the menu:
TextApe=CreatePopupMenu();
TextApe.Add("&A Remove empty lines (incl. whitespace)",1);
TextApe.Add("&B Remove empty lines",2);
TextApe.Add("&C Reduce many empty lines to one (incl. ws)",3);
TextApe.Add( "", 0, eeMenuSeparator );
TextApe.Add("&D Reduce many whitespace to one",31);
TextApe.Add("&E Remove every whitespace",32);
TextApe.Add("&F Remove leading whitespace",33);
TextApe.Add("&G Remove trailing whitespace",34);
TextApe.Add("&H Remove lead+trail whitespace",35);
TextApe.Add("&i Remove first sign (any)",36);
TextApe.Add("&J Remove first sign (non-blank)",37);
TextApe.Add("&K Remove any of this signs in front...",38);
TextApe.Add("&L Remove last sign (any)",39);
TextApe.Add( "", 0, eeMenuSeparator );
TextApe.Add("&M Insert in front...",61);
TextApe.Add("&N Insert in front... of first sign",62);
TextApe.Add("&O Insert to the end...",63);
TextApe.Add("&P Enclose selection...",64);
TextApe.Add("&Q Enclose each line...",65);
TextApe.Add( "", 0, eeMenuSeparator );
TextApe.Add("About",1000);
//Get which item was clicked:
var vClickedItem = TextApe.Track();
//Execute the related code block:
switch(vClickedItem)
{
case 1:
//Remove empty lines (incl. whitespace) - in Selection
document.selection.Replace("^s*n","",eeFindNext | eeReplaceSelOnly | eeReplaceAll | eeFindReplaceRegExp);
break;
case 2:
//Remove really empty lines only - in Selection
document.selection.Replace("^n","",eeFindNext | eeReplaceAll | eeReplaceSelOnly | eeFindReplaceRegExp);
break;
case 3:
//Reduce many empty lines to one (incl. ws) - in Selection
document.selection.Replace("^s+$","",eeFindNext | eeReplaceAll | eeReplaceSelOnly | eeFindReplaceRegExp);
document.selection.Replace("n{2,}","nn",eeFindNext | eeReplaceAll | eeReplaceSelOnly | eeFindReplaceRegExp);
break;
case 31:
//Reduce many whitespace to one - in Selection
document.selection.Replace("s{2,}"," ",eeFindNext | eeFindReplaceEscSeq | eeReplaceSelOnly | eeReplaceAll | eeFindReplaceRegExp);
break;
case 32:
//Remove every whitespace - in Selection
document.selection.Replace("s+","",eeFindNext | eeReplaceSelOnly | eeReplaceAll | eeFindReplaceRegExp);
end();
break;
case 33:
//Remove leading whitespace - in Selection
document.selection.Replace("^s+","",eeFindNext | eeReplaceAll | eeReplaceSelOnly | eeFindReplaceRegExp);
break;
case 34:
//Remove trailing whitespace - in Selection
document.selection.Replace("s+$","",eeFindNext | eeReplaceAll | eeReplaceSelOnly | eeFindReplaceRegExp);
break;
case 35:
//Remove leading + trailing whitespace - in Selection
document.selection.Replace("^s*(.+?)s*$","$1",eeFindNext | eeReplaceAll | eeReplaceSelOnly | eeFindReplaceRegExp);
break;
case 36:
//Remove first sign from selected lines
document.selection.Replace("^.","", eeReplaceSelOnly | eeReplaceAll | eeFindReplaceRegExp);
end();
break;
case 37:
//Remove first non-blank sign from selected lines
document.selection.Replace("^(s*).(.+)$","$1$2", eeReplaceSelOnly | eeReplaceAll | eeFindReplaceRegExp);
break;
case 38:
//Remove any of this signs in front of line - in Selection
RemoveAnyOfThisSigns();
break;
case 39:
//Remove last sign from selected lines
document.selection.Replace(".$","", eeReplaceSelOnly | eeReplaceAll | eeFindReplaceRegExp);
break;
case 61:
//Insert in front of selected lines
Leader = prompt("What to insert in front?","// ");
document.selection.Replace("^",Leader, eeReplaceSelOnly | eeReplaceAll | eeFindReplaceRegExp);
break;
case 62:
//Insert in front of first non-empty - in selected lines
Leader = prompt("What to insert in front?","// ");
document.selection.Replace("^(s*)(.)","$1"+Leader+"$2", eeReplaceSelOnly | eeReplaceAll | eeFindReplaceRegExp);
break;
case 63:
//Insert to the end of selected lines
Trailer = prompt("What to insert to the end?"," //");
document.selection.Replace("$",Trailer, eeReplaceSelOnly | eeReplaceAll | eeFindReplaceRegExp);
break;
case 64:
//Enclose selected word
mySign = prompt( "Enter sign to enclose selection:", "\%" );
selText = document.selection.Text;
document.selection.Text = mySign + selText + mySign;
break;
case 65:
//Enclose each selected line
mySign = prompt( "Enter sign to enclose selection:", "\%" );
document.selection.Replace("^(.*)$",mySign+"$1"+mySign, eeReplaceSelOnly | eeReplaceAll | eeFindReplaceRegExp);
break;
case 1000:
alert("EmEditor TextApe :-)nv0.03, 22. Mai 2012nnJust some nifty macros.nEnjoy!nnStefan");
break;
default:
break;
}
//Some bigger or maybe common used function:
function init(){
if(document.selection.IsEmpty){
alert("This macros works with an selection only.n
Please make an selection first, then call this menu again.");
quit();}
redraw = false;
}
function RemoveAnyOfThisSigns(){
Signs = prompt("What to delete in front?",">-*,+");
if (Signs.indexOf("-") > -1){
Signs = Signs.replace("-",""); Signs = Signs + "-";}
for (i=1;i<10;i++){
document.selection.Replace("^(s*)[+Signs+]+","$1",eeFindNext
| eeReplaceAll | eeReplaceSelOnly | eeFindReplaceRegExp);
}
}
function end(){document.HighlightFind = false;}
//<EOF>
Stefan
Participantuser wrote:
great thanks!how do I count the instances of a match and store the amount in a variable?
Do the RegEx s&r with an macro.
For example i have found that this
JavaScript macro could be an base for your issue:
//select your text, then execute the macro
if (document.selection.IsEmpty){alert('Nothing selected?'); quit();}
SelText = document.selection.text;
alert(SelText); // <== only for testing
//Settings:
MatchREx = "(.+?t).+t(NOT SENT|SENT)"; //Match/Find this
ReplWith = "$1$2"; //Replace with that
REModify = "gi"; //(G)lobal, (i)gnor case, (M)ultiline
//How many matches?
Matches = SelText.match(RegExp(MatchREx,REModify)).length;
//Do the RegEx search&replace itself:
ReplacedStr = SelText.replace(RegExp(MatchREx,REModify),ReplWith);
//The output:
alert(Matches + ' matches found'); // <== only for testing
alert(ReplacedStr); // <== only for testing
//Overwrite the selected text:
//document.selection.text = ReplacedStr;
Stefan
ParticipantHi Michael, welcome.
Maybe you should post one or two example lines
and your “before” and “after” solutions.From interest is too which version of EmEditor you use.
Perhaps even the new betas?.
Stefan
Participantuser wrote:
FROM:
GROUP1{TAB}IT{TAB}EM1{TAB}SENT
GROUP1{TAB}I{TAB}TE M2{TAB}SENT
GROUP2{TAB}IT E M3{TAB}SENT
GROUP2{TAB}ITE{TAB}M4{TAB}NOT SENT
GROUP2{TAB}ITEM5{TAB}SENTTO:
GROUP1{TAB}SENT
GROUP2{TAB}NOT SENTTry (with an copy of your file!)
this RegEx search & replace:FIND: (.+?t).+t(NOT SENT|SENT)
REPL: $1$2
[X] Use Regular ExpressionsExplanation:
(.+?t) = match and store all non-greedy till the first TAB into group $1
.+ = match all, but only till:
t(NOT SENT|SENT) = an TAB followed by “not sent” OR “sent”, which ever is stored in $2.
Stefan
ParticipantThanks webern, but that doesn’t explains why it works in one version and not in the other.
Anyway, i have now understood that i doesn’t need the part
o.SetActivePoint(eePosLogical, 1, yPosEnd, true);and also not the part
yPosEnd = o.GetActivePointY(eePosLogical);New version:
// Shorten the object string, just for fewer typing:
o = document.selection;
// - - -
// Find something backwards/up, here empty line:
o.Find("^s*$",eeFindPrevious | eeFindReplaceRegExp);
// Remember the current line number:
yPosBegin = o.GetActivePointY(eePosLogical) +1;
// - - -
// Find again something downwards
// (here: find an blank line, non-greedy)
// AND move the cursor that way to the found position :
o.Find("^s*$",eeFindNext | eeFindReplaceRegExp);
// Do an selection.
// Set the start of the selection to the remembered line.
// The end of the selection will be the current line:
o.SetAnchorPoint(eePosLogical, 1, yPosBegin);
Similar i use now this to just select down
to the next blank line:
o = document.selection;
//Remember the current line number:
yPos = o.GetActivePointY( eePosLogical );
//Move cursor to found position (here: find an blank line):
o.Find("^$",eeFindNext | eeFindReplaceRegExp);
//Do an selection.
//Set the start of the selection to the remembered line:
o.SetAnchorPoint( eePosLogical, 1, yPos );
.
- AuthorPosts