Forum Replies Created

Viewing 25 posts - 1 through 25 (of 85 total)
  • Author
    Posts
  • in reply to: Active String: Add control modifier #29779
    Patrick C
    Participant

    Regarding 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/

    in reply to: Active String: Add control modifier #29777
    Patrick C
    Participant

    Ok I’ll try to write a Macro sometime this week and will post it here.
    Many thanks for considering!

    in reply to: Batch change macro’s path #29521
    Patrick C
    Participant

    In 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.

    in reply to: Batch change macro’s path #29517
    Patrick C
    Participant

    Though just noticed a shortcoming: Macro shortcuts are not or only partially preserved 😐

    in reply to: Batch change macro’s path #29516
    Patrick C
    Participant

    Wow, 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!

    in reply to: Snippets #29506
    Patrick C
    Participant

    Glad I could help 😀
    Thanks for the feedback!

    in reply to: Snippets #29504
    Patrick C
    Participant

    I 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);
    in reply to: Insert Date Time Formating #29377
    Patrick C
    Participant

    I’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() );
    in reply to: Question of Hightlight search results #28292
    Patrick C
    Participant

    Sorry, not done yet.
    The cursor’s colour is set analogously by the “Selection” property (second entry from top on my installation).

    in reply to: Question of Hightlight search results #28291
    Patrick C
    Participant

    Menu bar:
    ToolsProperties for all ConfigurationsDisplay → Scroll way down and select “Search string” → Select the […] located next to the background colour combobox.

    Cheers
    Patrick

    in reply to: Search and Replace Number Count #28287
    Patrick C
    Participant

    Yes, its displayed on bottom left part of the status bar:
    Menu Bar → View → Status bar

    The 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.

    Patrick C
    Participant

    Hello Yutaka

    Version 21.7.910
    Does not crash 😀

    Version 21.7.1
    Crashes 🙁

    Looking forward to the next non beta update.

    Many thanks!

    Patrick C
    Participant

    Version 21.7.1

    with ↵ denoting a new line:

    foo    bar↵ 
    FOOs   BARs↵
    Foo    Bar↵ 

    In the above: select the block containing
    bar
    BARs
    Bar

    try to change the case, e.g. lowercase

    EmEditor will crash

    in reply to: UTF-8 without signature recognised as Vietnamese #28141
    Patrick C
    Participant

    figured out a ‘solution’ for [2] :
    ToolsProperties for all ConfigurationsFile → untick “Detect all

    [1] might still be of interest for Yutaka

    Patrick C
    Participant

    Arghh, stupid me
    You can do this in one step

    Find in files → Extract with Regex:
    (?<=")[^"]*__data\/assets.*?(?=")

    With the extract option display matched strings only
    😴

    Patrick C
    Participant

    Figured it out:
    First extract the lines via find in file

    Then Find → Extract with Regex:
    (?<=")[^"]*__data\/assets.*?(?=")

    🙂

    Patrick C
    Participant

    Partial 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 compatible

    Does somebody know how to apply the /gU regex flag?
    Would really appreciate this

    in reply to: EmEditor Clean Install #27579
    Patrick C
    Participant

    With 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.

    in reply to: Custom TSV #26926
    Patrick C
    Participant

    View → Toolbars → CSV Toolbar
    you’ll notice that there are four default CSV profiles to choose from

    it might help to think of CSV, TSV,… as *SV i.e. each of them can be configured freely

    to configure:
    Tools → Customise → CSV

    Patrick C
    Participant

    Tip: My preferred tool for testing out and learning regex is
    regex101 dot com

    Patrick C
    Participant

    Welcome to the regex kitchen stew (semi serious; regex seems to drive most people I know either mad or desperate or both)

    Anyway one possible RegEx for finding 2 or 4 but not 24 is:
    (2(?!4)|(?<!2)4)

    Which works on
    1
    2
    3
    09
    4
    5
    24
    51
    1,2,3,09,4,5,24,51,4,2,42,8,4,6,2,8
    2
    4

    To get an idea on what this does
    (a|b)
    finds either a or b, where
    a = 2(?!4) finds 2 without a trailing 4
    b = (?<!2)4 finds 4 without a leading 2

    Note that I’m not a regex guru.

    Patrick C
    Participant

    I’m really short on time and its not the complete answer, but the regex for finding 2 or 4 is:
    [24]

    This will however, select only one of the characters at a time.

    Patrick C
    Participant

    Tools → Customise → Workspace → Automatic Workspace: Save, Restore and Keep Undo Information, and No Prompt to Save Files
    http://www.emeditor.org/en/dlg_customize_workspace_index.html

    in reply to: An option to change Toolbar animation #25853
    Patrick C
    Participant

    Interesting I haven’t got this behaviour.

    Have you tried setting
    Tools → Customise Menus… → Delay time
    to 0.0 seconds ?

    Cheers
    Patrick

    in reply to: Selecting Multiple Columns in CSV #25546
    Patrick C
    Participant

    Thank you Yutaka!

Viewing 25 posts - 1 through 25 (of 85 total)