Forum Replies Created
- AuthorPosts
- StefanParticipant
.
Hi and welcome.
1.)
Do “<span" and "” always be on the same line?Or could it be that they are on different lines like
1.
CCNA Portable Command GuideYour example doesn’t provide this detail.
– – –
2.)
Is it always the first occurrence of “” in a line that can be remove?Then the rule would be easier:
if there is found a closing tag without an opening tag before, then it can be removed.Proof Of Concept:
openTag = "<span";
closingTag = "</span";
yLine = document.selection.GetActivePointY( eePosLogical );
str = document.GetLine( yLine );
openTagPos = str.indexOf(openTag);
closingTagPos = str.indexOf(closingTag);
if(closingTagPos > -1){
if(openTagPos == -1 || (closingTagPos < openTagPos)){
alert("delete");
}else{
alert("all ok");
}
}else{
alert("not found " + closingTag);
}
StefanParticipantI am not against updates ;-)
Keep am coming :-D
StefanParticipantSorry, i don’t understood.
I see nothing which is “insert before / insert after”.Rather i see an “break at comma” reformating.
I would do it like this:
– format the first lines yourself till the “modified:”– next do an search&replace:
Find: ,
Replace with: ,n
[X]Use Escape Sequence– next do the indenting
@Yutaka, this search&replace doesn’t respect this setting:
“Configuration – General tab – Tab/Indent > [X]Enable Auto Indent”
I had expected it would be auto -indent with s&r n too.StefanParticipantshastafir wrote:
Disregard. Figured it out…Your post would have made much more sense
if you would have provided an how-it-works :-xLike:
To add decimal numbers with leading zeros
with the “Edit > Advanced > Numbering… Alt+N” tool,
just add the format you want
into the ‘First Line:’ box of the ‘Insert Numbering’ dialog.Default is ‘1’, but you can also enter something like ‘001’ or so.
.
StefanParticipant.
Do you know you can use the snippet plugin
to insert snippets OR execute an macro?http://www.emeditor.com/modules/feature1/rewrite/tc_35.html
.
StefanParticipant.
Yutaka wrote:
Please let me know again if new features didn’t show up when the new major beta version becomes available.If i use “Separated Values”
the columns are nicely aligned
at the given delimiter.But how can i insert spaces to
have them separated even if i
leave “Separated Values” mode?.
StefanParticipant.
Yutaka wrote:
Please let me know again if new features didn’t show up when the new major beta version becomes available.Please consider to add “Restore last Selection”.
I think that would be really useful.
.
StefanParticipant.
Yutaka wrote:
Please let me know again if new features didn’t show up when the new major beta version becomes available..
Stefan wrote:
I want to suggest to
* add an option “[X]Skip empty lines”
* add an option “[X]Restart numbering after empty lines”.
September 5, 2012 at 9:43 am in reply to: External Tools: new argument to use clipboard content #10522StefanParticipant.
Yutaka wrote:
Please let me know again if new features didn’t show up when the new major beta version becomes available..
September 5, 2012 at 9:42 am in reply to: External Tools: new argument to ask / prompt for parameter #10521StefanParticipant.
Yutaka wrote:
Please let me know again if new features didn’t show up when the new major beta version becomes available..
StefanParticipant.
Reminder
Yutaka wrote:
Please let me know again if new features didn’t show up when the new major beta version becomes available.Hi Yutaka.
I still think there should be an easy way to just
collapse whole paragraphs with the Outline plugin.
(Just having blank lines as delimiter)I want to suggest to add “Paragraph”
to the “Type” drop-down list._
EDIT
in the meantime I have found a work around:
Search and replace begin of paragraph with a dot.
Find: ^$rn(.)
Repl: nn.1Then use default Outline plugin Custom method for Text
.
..
…
….
…..Of course we can use another char then dot.
.StefanParticipant.
Yutaka wrote:
Please let me know again if new features didn’t show up when the new major beta version becomes available.Hi Yutaka.
If I import an big *.eesnip file, then all
sub-folders are expanded automatically at import,
and i have to collapse all folders by hand each
to get an better overview.I can use Arrow-left/Arrow-right a few times
but that takes time, especially with sub-sub folders.So i missed context menu item like
* ViewCollapse all sub-folderMaybe that is an improvement idea for you?
今後もよろしくお願い申し上げます。
August 16, 2012 at 9:49 am in reply to: Macro: Paste/Merge/Join two list together side-by-side #10488StefanParticipantMerge two list together side-by-side RANDOM-ized
Hi folks, I was asked how to
random the two list together side-by-side.Here is my answer:
//EmEditor Script (JavaScript)
// Merge two list together side-by-side RANDOM-ized
// shuffle intermix stochastic stochastically
// (see examples) Writes result to new document.
//=======================================================
//============ U S E R S E T T I N G S ==================
// Separate your two input list by at least 5 #'s
// Example input:
// JAMES
// JOHN <<< Left side in output
// WILLIAM
// RICHARD
// CHARLES
// ########## <<< Five or more #'s, but not less!
// MARY
// PATRICIA
// LINDA <<< Right side in output
// BARBARA
// ELIZABETH
Separator = "#####";
// Delimiter to be used for separating
// consecutive values on a single line.
// Join both input lists side-by-side,
// separated by that sign in the output
// Example output:
// WILLIAM + ELIZABETH
// CHARLES + PATRICIA
// RICHARD + BARBARA
// JAMES + MARY
// JOHN + LINDA
// or
// JOHN + BARBARA
// JAMES + PATRICIA
// RICHARD + ELIZABETH
// CHARLES + LINDA
// WILLIAM + MARY
// or
// WILLIAM + PATRICIA
// JAMES + BARBARA
// RICHARD + ELIZABETH
// CHARLES + LINDA
// JOHN + MARY
// or...
//
Delimeter = " + ";
//===========================================================
//===========================================================
//============ T H E S C R I P T ==========================
document.selection.SelectAll();
sel = document.selection.Text; //alert(sel);
Lines = sel.split("rn"); //Using Windows Line Enders here
SeparatorFound = false;
arrONE = new Array();
arrTWO = new Array();
arrOUT = new Array();
for(L = 0, Ls = Lines.length; L < Ls; L++){
if (Lines[L].indexOf(Separator) != -1){
SeparatorFound = true; continue; //SKIP
}
if (SeparatorFound==false){
arrONE[L] = Lines[L];
}else{
arrTWO[L] = Lines[L];
}
}
//Randomize the order of the array:
arrONE.sort( function() {return 0.5 - Math.random()} );
arrTWO.sort( function() {return 0.5 - Math.random()} );
//Join the arrays side-by-side:
for(idx=0,Len=arrONE.length; idx<Len; idx++){
arrOUT[idx] = arrONE[idx] + Delimeter + arrTWO[idx];
}
//============ O U T P U T =================================
OUT = arrOUT.join("rn");
//alert(OUT);
//Works with EmEditor:
editor.NewFile();
document.write(OUT);
//The End
//===========================================================
shuffle intermix stochastic stochastically random randomized
StefanParticipantsupport++
An “repeat the last action/command” command
is very useful often.– – –
The shortcut F4 is already taken
but we can assign an key at our own.On the other hand it is nifty
if such basic features have an shortcut by default
so all would know what we talked about.As far as i see, Ctrl+R is free.
.
StefanParticipant>>
“”unfortunately, XYplorer doesn’t show EmEditor’s entry
in its context menu, unlike Windows Explorer (64-bit).””Do you really need an context menu?
With XYplorer you have several possibilities
to call EmEditor with one or all selected files:* from an button
* from the catalog on the left
* from User Menu
Open selected item(s) with:..EmEditorEmEditor.exe* via an shortcut
e.g.: Shift+E* via Portable File Association by double clicking an file directly
* via Portable File Association by opening an context menu first
+|”Open with &EmEditor ” *>”..EmEditorEmEditor.exe”
or
+|”Open with &EmEditor ” txt;log;cpp;h>”..EmEditorEmEditor.exe”.
StefanParticipantIsn’t that normal?
Just google a bit:
JavaScript and VBScript doesn’t supported Lookbehind at all.
Lookahead is fully supported.You can use Python or Perl if you want to use Lookbehind.
EmEditor Help – EmEditor Macro Reference – Directives
#language directive(though that languages are not installed on windowsTM as default)
.
StefanParticipant2.) GoTo and select to line X
Purpose:
select the lines from start line to line number X.
Where X is a line number you entered to go to.
Tip; Line X can be below or above current line.2a) EmEditor internal commands:
To select an block:
* set your cursor on the start of the line you want
* press F8 to set “begin of block marker”
* press Ctrl+G and enter the line number to go to
(Tip: press ESC to leave selection mode)To select whole lines:
* same as above but press Ctrl+F8To select an rectangular/vertical block:
* set your cursor on the line and column you want
* press Ctrl+Shift+F8 to set “begin of block marker”
* press Ctrl+G and enter the line and column number to go to
(Tip: press ESC to leave selection mode)Search the help for “F8”:
EmEditor Help – How to – Edit
To Select a Portion of a DocumentClick 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.2b) If you want to use an script for that,
the following code could be an start:To select an block:
* set your cursor on the line you want
* execute this script and enter the line number to go too = document.selection;
yPos = o.GetActivePointY(eePosLogical);
TargetLine = prompt("Select to line:","");
o.LineDown(true, (TargetLine - yPos));To select whole lines:
– start at begin of line
– at the end hold Shift-key and press End-key
Or add this to the end of the script:
document.selection.EndOfLine(true, eeLineLogical);To select an rectangular/vertical block:
– i will post next….
StefanParticipantJohnQSmith 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)StefanParticipantThanks 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’:
StefanParticipantI know what you mean:
but i don’t know how EmEditor will aid you here.
.
StefanParticipantYou 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’)StefanParticipantIs 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();
.
StefanParticipantHi 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.
StefanParticipantFound 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.StefanParticipant//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);
}
- AuthorPosts