Forum Replies Created
- AuthorPosts
Patrick C
ParticipantI once had a similar problem and resorted to PowerShell:
Get-Content .\my_UTF8_file.txt | Set-Content -Encoding utf32 my_UTF32_file.txt
or
Get-Content .\my_UTF16_file.txt | Set-Content -Encoding utf32 my_UTF32_file.txt
Kudos to https://superuser.com/questions/1163753/converting-text-file-to-utf-8-on-windows-command-prompt
+ reference https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.management/set-content?view=powershell-7.4#-encodingPatrick C
ParticipantExample code (formatted version):
#title = "URL open or select" #icon = "C:\\Windows\\System32\\shell32.dll",135 #tooltip = "URL open or select" #language = "V8" #async = "off" // Self test: https://www.emeditor.com/ // Issue with control + single click: https://www.emeditor.com/forums/topic/control-click-triggers-double-click/ // PC, Version 1.0 "use strict"; bCtrlDown = shell.GetKeyState( 0x11 ) < 0; if( bCtrlDown ) { // OutputBar.writeln( '"'.concat(document.selection.Text, '"') ); shell.Run( "c:\\Program Files\\Vivaldi\\Application\\vivaldi.exe", 1, false, '"'.concat(document.selection.Text, '"') ); document.selection.Collapse(); }
Patrick C
ParticipantIn case someone runs into an error when installing EmEditor`s local help emed_help_en_24.2.0.msi (https://www.emeditor.com/download-help/):
I did first uninstall the old help. Nonetheless the error remained.
Solution:
Remove all remaining files in
c:\ProgramData\Emurasoft\EmEditor\Help\Patrick C
ParticipantOh thank you Yutaka 😃, I`m super grateful for this and for EmEditor as a whole – best text editor ever 😃 🙏 🙇
Patrick C
ParticipantThanks!
My only use would be the Active String ctrl modifier, just in case that’s easier.
But anyway, adding the modifiers just a suggestion, if you can add it: Great. If not: I’ll be fine and appreciate all the other features that are added instead.Patrick C
ParticipantRegarding the macro: I`m currently stuck with the condition on the pressed shift / alt / ctrl key.
See: https://www.emeditor.com/forums/topic/modifier-key-ctrl-alt-shift-is-was-pressed/Patrick C
ParticipantOk I’ll try to write a Macro sometime this week and will post it here.
Many thanks for considering!Patrick C
ParticipantIn my case it works fine.
Copy / pasting outputted
E:\ProgDB\EmEditor\Macros\Toggle_read_only.jsee \t 0x00000000 E:\ProgDB\EmEditor\Macros\insert_date_only.jsee \t 0x00000000 E:\ProgDB\EmEditor\Macros\insert_date_time.jsee \t 0x00000000 E:\ProgDB\EmEditor\Macros\insert_date_long_time.jsee \t 0x00000000 E:\ProgDB\EmEditor\Macros\delete_between_bookmarks.jsee \t 0x00000000
Where \t is the tab character.
It looks like the \t and 0x00000000 can be omitted from the list.
Pasting allows me to run the Macro, but when trying to edit them I get your “The following files do not exist error”. → Restarting EmEditor fixes this.Patrick C
ParticipantThough just noticed a shortcoming: Macro shortcuts are not or only partially preserved 😐
Patrick C
ParticipantWow, this is ultra-useful for me because sometimes my Macros end up in a mess and this makes cleaning up a whole lot easier 😃
Many thanks to spiros for asking the question and Yutaka for answering it!
Patrick C
ParticipantGlad I could help 😀
Thanks for the feedback!Patrick C
ParticipantI use the following .jsee macro, perhaps it helps (you could assign ctrl+shift+. to the macro, I use ctrl+D, which works reliably).
var date = new Date(); var dd = date.getDate(); // returns the day of the month (from 1 to 31) if( dd < 10 ) dd = "0" + dd; var MM = date.getMonth() + 1; // returns the month (from 0 to 11)! if( MM < 10 ) MM = "0" + MM; var yyyy = date.getFullYear(); // Returns the year (4 digits) // “Output” document.write( yyyy + "-" + MM + "-" + dd);
Patrick C
ParticipantI’ve got an old script that gets close, perhaps it helps.
// Inspired by & resources // https://www.emeditor.com/forums/topic/option-to-adjust-the-datetime-format-edit-insert-time-and-date/ // https://www.emeditor.com/forums/topic/insert-long-date/ // https://www.w3schools.com/jsref/jsref_tolocaledatestring.asp + jsref_getmonth.asp + jsref_getdate.asp function return_date_long_time() { var date = new Date(); // var n = d.toLocaleDateString(); // old approach - unreliable // Date assembly var dd = date.getDate(); // returns the day of the month (from 1 to 31) if( dd < 10 ) dd = "0" + dd; var MM = date.getMonth() + 1; // returns the month (from 0 to 11)! if( MM < 10 ) MM = "0" + MM; var yyyy = date.getFullYear(); // Returns the year (4 digits) // time assembly var hh = date.getHours(); // Returns the hour (from 0-23) if( hh < 10 ) hh = "0" + hh; var mm = date.getMinutes(); // Returns the minutes (from 0-59) if( mm < 10 ) mm = "0" + mm; var ss = date.getSeconds(); // Returns the seconds (from 0-59) if( ss < 10 ) ss = "0" + ss; // “Output” return( yyyy + "-" + MM + "-" + dd + " " + hh + ":" + mm + ":" + ss ); } document.write( return_date_long_time() );
Patrick C
ParticipantSorry, not done yet.
The cursor’s colour is set analogously by the “Selection” property (second entry from top on my installation).Patrick C
ParticipantMenu bar:
Tools → Properties for all Configurations → Display → Scroll way down and select “Search string” → Select the […] located next to the background colour combobox.Cheers
PatrickPatrick C
ParticipantYes, its displayed on bottom left part of the status bar:
Menu Bar → View → Status barThe only annoying thing is that the Find/Replace dialogue will not show you the number of found strings, but it will show the number of replaced strings.
In contrast the Find (without replace) dialogue allows you to count the number of finds.*) I’ll ask Yutaka if he could add the find dialogue’s count matches tickbox to the replace dialogue.
May 28, 2022 at 1:09 am in reply to: crashes on lowercase / uppercase when the selection exceeds the line’s end #28211Patrick C
ParticipantHello Yutaka
Version 21.7.910
Does not crash 😀Version 21.7.1
Crashes 🙁Looking forward to the next non beta update.
Many thanks!
May 27, 2022 at 6:16 am in reply to: crashes on lowercase / uppercase when the selection exceeds the line’s end #28208Patrick C
ParticipantVersion 21.7.1
with ↵ denoting a new line:
foo bar↵ FOOs BARs↵ Foo Bar↵
In the above: select the block containing
bar
BARs
Bartry to change the case, e.g. lowercase
EmEditor will crash
Patrick C
Participantfigured out a ‘solution’ for [2] :
Tools → Properties for all Configurations → File → untick “Detect all”[1] might still be of interest for Yutaka
March 30, 2022 at 11:06 am in reply to: Extract each occurrence of a string into a separate line to build a list of URLs #28134Patrick C
ParticipantArghh, stupid me
You can do this in one stepFind in files → Extract with Regex:
(?<=")[^"]*__data\/assets.*?(?=")
With the extract option display matched strings only
😴March 30, 2022 at 10:52 am in reply to: Extract each occurrence of a string into a separate line to build a list of URLs #28133Patrick C
ParticipantFigured it out:
First extract the lines via find in fileThen Find → Extract with Regex:
(?<=")[^"]*__data\/assets.*?(?=")
🙂
March 30, 2022 at 10:29 am in reply to: Extract each occurrence of a string into a separate line to build a list of URLs #28132Patrick C
ParticipantPartial answer
You probably cannot do it in one step, but you would* be able do this in two:
First extract
and then Find -> Extract with the following Regex*
/https:\/\/.*__data\/assets.*(?=")/gU
*there is a problem here:
The syntax above is not perl compatibleDoes somebody know how to apply the /gU regex flag?
Would really appreciate thisPatrick C
ParticipantWith respect to: to fully replace Windows Notepad
Automatically setting file type associations under Windows 10 is no longer as simple as it used to be. Several other programs I use have also given up on this and EmEditor’s built in function also doesn’t seem to work on Windows 10.
My preferred approach to setting associations is by (text file example; ditto for .reg etc):
● Right click → Open With → Choose another app → Select your app (might require selecting the .exe’s location) + Tick “Always use this app to open .txt files”it’s settings are all over the place and it doesn’t seem to have command line support for restoring them all at once
I’m not entirely sure whether you are referring to EmEditor’s “fresh out of the box” settings or your custom settings and toolbars.
With respect to custom settings and toolbars: I agree that backing these up and restoring these is a pain. Custom macros are even worse, so I would very much welcome a more streamlined approach.
With respect to EmEditor’s default settings: Hit ctrl+Q; type “reset all” → select the “reset all settings” command and execute “run this command”Hope some of this helps.
Patrick C
ParticipantView → Toolbars → CSV Toolbar
you’ll notice that there are four default CSV profiles to choose fromit might help to think of CSV, TSV,… as *SV i.e. each of them can be configured freely
to configure:
Tools → Customise → CSVJuly 5, 2019 at 10:37 am in reply to: Multiple-line string as a search string in the Find/Replace dialog box #25953Patrick C
ParticipantTip: My preferred tool for testing out and learning regex is
regex101 dot com- AuthorPosts