Forum Replies Created

Viewing 25 posts - 51 through 75 (of 99 total)
  • Author
    Posts
  • in reply to: Emeditor crashes when opening Western European encoded files #23807
    Patrick C
    Participant

    EmEditor version
    EmEditor version

    Crash Report
    Crash report

    Non Unicode Language setting
    Non unicode language setting

    Email will follow shortly.

    in reply to: Different Record Delimiter #23575
    Patrick C
    Participant

    Hi Ken,

    As far as I can see using a newline character other than the typical CR &/∨ LF combinations doesn’t seem to be possible.
    However, you can write a macro to convert ÿ into CR LF and back again. Provided you aren’t dealing with >1 million lines and >10MB files, this should be pretty fast too.

    Best wishes,
    Patrick

    in reply to: Filter lines starting with capital letter #23092
    Patrick C
    Participant

    Probably Spiros already knows, but if not (hope you get notified of follow up replies to this post):

    Yutaka’s new Character count plug in is super fast and its ‘view line’ field shows the number of lines filtered.

    Thank you Yutaka!
    And btw: Also thank you for the DirectWrite implementation – I absolutely love it, the text is crispy clean and Emojis now work great too.

    in reply to: Changes to filtered line apply to all lines in between #23022
    Patrick C
    Participant

    Yep, I’ve fallen foul of the same too, at least twice or more times.

    The correct way to apply lowercase is by using find replace with regular expressions:

    Find replace with regular expressions

    results in:
    Result

    in reply to: Filter lines starting with capital letter #23021
    Patrick C
    Participant

    Hello Yutaka

    I’ve now noticed, that word count does the same thing but the other way round.
    What I basically meant is as follows:

    Case where the last line is not blank:
    Last line not blank

    Results in ctrl-a finding 13+1 = 14 lines instead of 13; Word count finds 13 view lines
    An additional line found

    Case where the last line is blank:
    Last line blank

    Results in ctrl-a finding 13 lines; interestingly Word count finds 14 view lines
    13 lines found; 14 in case of word count

    in reply to: Filter lines starting with capital letter #22964
    Patrick C
    Participant

    As in the image:
    Option 2:
    Hit ctrl+a to select all lines, then the bottom right indicator shows the number of selected lines and the total number of lines.
    Option 2 is fast in my case. There is one downside that Option 2 does add the last line to the count if it is blank.

    Word count

    PS Regarding option 1:
    Yes, sadly sluggish performance is the case for large files.

    in reply to: Filter lines starting with capital letter #22960
    Patrick C
    Participant

    Regarding the number of lines filtered:

    Option 1:
    Use the “Word Count” plugin (Tools → Plug-ins → 9 WordCount)
    Word count shows the total number of “Lines” and the “View Lines”, with the View Lines corresponding to the number of filtered lines.

    Option 2:
    Hit ctrl+a to select all.
    The status bar in the bottom right corner will then show the number of selected lines.

    in reply to: Filter lines starting with capital letter #22957
    Patrick C
    Participant

    Provided I didn’t mess up, the following should do

    ^[Α-ΩA-Z].*$

    Where
    ^ start of string (i.e. line)
    followed by a character within [Α-ΩA-Z]
    followed by any character (except newlines) .
    occurring zero or more times *
    $ end of string (i.e. line)

    Let me know if it does or doesn’t work.

    Cheers

    Patrick

    PS The full syntax would be
    /^[Α-ΩA-Z].*$/gm

    in reply to: Import Syntax button grayed out #22928
    Patrick C
    Participant

    Hi Billy,

    You’re almost there. Step 6 actually is:

    6. Change the top drop down menu from Only Default Keywords to either
    Both User Defined Strings and Default Keywords
    or
    Only User Defined Strings

    7. Click on the Import button, locate, and open the appropriate syntax file.

    Best wishes,
    Patrick

    in reply to: zoom in/out of the text -> how to? #22901
    Patrick C
    Participant

    The easiest way to zoom is:
    ctrl + scroll the mouse wheel either up or down

    No zoom: Hit ctrl + 0

    Note that EmEditor doesn’t exactly zoom but increase and decrease the font size (you can check under View → Font Size #1, which changes when zooming)

    in reply to: How to open the same file in several windows? #22867
    Patrick C
    Participant

    Not that I know. However, I do sometimes use the split feature to view the same file over two of my screens (triple screen set-up). Still, being able to split the same file over two tabs for example would be interesting, especially when working on a laptop.

    in reply to: Add option to scroll window instead of moving cursor #22774
    Patrick C
    Participant

    You’re welcome. Glad I could help.

    in reply to: Add option to scroll window instead of moving cursor #22766
    Patrick C
    Participant

    Use the following code for toggling:

    // Toggle the scrolling behaviour
       // !!! Important: It seems that assigning to cfg is required!              !!!
       // !!!   Simply executing document.Config.Save(); seems to have no effect  !!!
    cfg = document.Config;
    cfg.Scroll.MoveCursorScroll = !(cfg.Scroll.MoveCursorScroll);
    cfg.Save();
    
    // Add a message to the status bar
    if (cfg.Scroll.MoveCursorScroll)
      status = "Fixed cursor scrolling is on";
    else
      status = "Fixed cursor scrolling is off";

    Copy paste to a text file, and save as YourMacroNameOfChoice.jsee
    Add this to “MyMacros” under Macros Customise Add (under MyMacros)

    You can now assign a shortcut to that Macro (under Tools Properties for All ConfigurationsKeyboardCategory: My Macros + Commands: YourMacroNameOfChoice

    When toggling, the status of the setting is shown on the bottom left status bar.

    in reply to: Add option to scroll window instead of moving cursor #22764
    Patrick C
    Participant

    Perhaps I first misunderstood you. If you want both the cursor and the window to move you’ll have to activate the “Move Cursor by Scrolling check box” option – I’ll get back to you with a macro to do this.

    in reply to: Add option to scroll window instead of moving cursor #22763
    Patrick C
    Participant

    Emeditor’s default shortcut for this is ctrl + ↑ and ctrl + ↓

    Speaking of which:
    Back in the old days the scroll lock key would do this, but these days that functionality seems to be almost extinct.

    in reply to: Question of "User menu 1-9"? #22725
    Patrick C
    Participant

    You have to manually add them to a menu entry or toolbar icon; or assign a shortcut.

    By default User Menu 1 is assigned to ctrl+k :
    http://www.emeditor.org/en/cmd_tools_user_menu1.html

    As far as I understand (and the way I use them) is that the user menus will appear at the cursor location, similar to right clicking, but with different menu options.

    To assign a shortcut / button / menu entry to a user menu, you will find them under
    Category: Tools
    Commands: User Menu (x)

    PS Let me know if you need further detail

    Patrick C
    Participant

    Sounds like macro to me.

    Paste the following two lines in a file and save as yourChoiceOfFileName.jsee

    document.selection.Paste();
    document.selection.NewLine(1);

    Add the file to the MyMacros list you’ll find under Macros → Customise.

    You can then assign a shortcut under Tools → Properties for All Configurations → Keyboard → Category: MyMacros

    in reply to: copying nothing #22650
    Patrick C
    Participant

    This is because by default ctrl+C is assigned to Edit → Copy

    Assigning ctrl+C to Edit → Copy Selection should solve your issue.

    Reassign by:
    Tools Properties for All ConfigurationsKeyboard Category: Edit + Commands: Copy Selection + hit ctrl+C in the Press New Shortcut key box + then click Assign

    This should solve your problem (it does on my machine with EmEditor Professional (64-bit) Version 17.2.5 and Windows 10 Version 1709).

    Patrick

    in reply to: shortcut/key to toggle comments #22626
    Patrick C
    Participant

    some delay about 1sec in execution

    Strange – on my PC with Emeditor version 17.2.4 the macro executes without any delay.
    And its not that sluggish – just tested commenting 128’000 lines of a 1096 kB file.
    Adding comments takes <0.1s, but removing comments takes 1.7 seconds for 128’000 lines.
    Removing comments is slow because the algorithm checks each line in order to properly cover special cases.

    is there a way to reduce this execution delay?

    Try running the macro without using the shortcut. In some cases the choice of shortcut key can lead to an execution delay

    all macros suffer from execution delay?

    None of mine do (i.e. at least on both my PC and my laptop).

    Is there a way to make them a part of the edior code?

    You can ask Yutaka, but as I hinted, making a comment on/off behaviour which suits all users is not as straightforward as it initially may seem.
    Perhaps writing your own compiled DLL to use as a plug-in might also speed up the code. So far doing this isn’t necessary for me.

    in reply to: shortcut/key to toggle comments #22624
    Patrick C
    Participant

    I wrote a macro for this purpose. However, it is customised according to my preferred behaviour, i.e.:
    1) Only single line comments (you can select multiple lines and comment them all at once, but only with a single line comment on each line).
    2) Comments always start on column 1 (the beginning of the line).

    Should this suit your needs:
    2017-11-18_line_comment_toggle.jsee
    Just add the macro to the My Macros list and assign a shortcut.

    Hope this helps.
    Patrick

    PS Getting users to agree on toggle comment on/off behaviour is tricky business.

    in reply to: How to include other macros DYNAMICALLY from macros? #22600
    Patrick C
    Participant
    in reply to: How to include other macros DYNAMICALLY from macros? #22599
    Patrick C
    Participant

    So far I used the Windows Registry «semi-hack ‘solution’», the following is an example:

    In script 1:

    var WshShell = new ActiveXObject( "WScript.Shell" );
    
    WshShell.RegWrite( "HKCU\\_Patrick_custom_\\str1", "ab cd",  "REG_SZ"    );
    WshShell.RegWrite( "HKCU\\_Patrick_custom_\\str2",  "1234",  "REG_SZ"    );
    WshShell.RegWrite( "HKCU\\_Patrick_custom_\\num1",   1234 ,  "REG_DWORD" );
    
     editor.ExecuteMacro( “d:\\script2.jsee”, eeRunFile | eeMacroLangJScript );

    In script 2:

    var WshShell = new ActiveXObject( "WScript.Shell" );
    
    var str1 = WshShell.RegRead( "HKCU\\_Patrick_custom_\\str1" );
    var str2 = WshShell.RegRead( "HKCU\\_Patrick_custom_\\str2" );
    var num1 = WshShell.RegRead( "HKCU\\_Patrick_custom_\\num1" );
    
    OutputBar.writeln( "str1     = " + str1                                                                      );
    OutputBar.writeln( "str2 + 1 = " + (str2 + 1)   +  "  // an imported string is not automatically a number"     );
    OutputBar.writeln( "num1 + 1 = " + (num1 + 1)   +  "  // an imported DWORD really is an integer"               );

    Hope this helps

    in reply to: Serious bug regarding macros mapped to shortcuts! #22590
    Patrick C
    Participant

    Now I recall – I had to reassign the macro shortcuts after the bug was fixed.

    In my case this wasn’t too bad an issue as I have a list of my custom shortcut settings. EmEditor isn’t the only program where my custom shortcuts got reset after updating (LibreOffice was another recent one) so over time I learnt – it remains annoying nevertheless.

    in reply to: Serious bug regarding macros mapped to shortcuts! #22588
    Patrick C
    Participant

    Are you using the latest version (17.2.2)?

    As far as I can remember this was one of the early v17.0 perhaps also v17.1 bugs which were fixed with ≈ v17.1 or v17.2.

    I btw just re-tested on v17.2.2 – in my case this error doesn’t occur.

    in reply to: How to include other macros DYNAMICALLY from macros? #22586
    Patrick C
    Participant

    Executing macros is simple:
    editor.ExecuteMacro( “d:\example.jsee”, eeRunFile | eeMacroLangJScript );
    http://www.emeditor.org/en/macro_editor_editor_executemacro.html

    However, I don’t whether or not dynamical includes are possible.

Viewing 25 posts - 51 through 75 (of 99 total)