• Windows 10 file associations and ShellExecute("edit"...

    Locked
    2
    0 Votes
    2 Posts
    3k Views
    PeterJonesP

    As I mentioned in another thread, my registry associates .txt with the HKCR\txtfile key; yours may be different: you can look in HKCR\.txt to determine the right association for your machine. Assuming my setup:

    You’ll notice the three keys “open”, “print”, and “printto”: mine does not have an “edit” key. So if they are really using the hardcoded “edit” key, rather than the default action (listed here as HKCR\txtfile\shell:(Default)=open), then it’s a poor choice on their part, because there is no guarantee that the “edit” key exists for a given association on a given machine.

    !!WARNING!! What I am about to explain involves editing the registry. This has associated risk, and should only be followed if you understand everything said, and are willing to take all responsibility for any change in behavior that occurs in your system. I make no guarantee or waranty regarding the effectiveness or safety of the following. (If your computer stops working, or doesn’t work the way you want it to, it’s not my fault.) Use at your own risk.

    You may be able to work around their choice. Right click on shell, select New Key = edit. Right click on edit, select New Key = command. Left click on open > command, double click on (Default), and copy the path to NPP (if your default isn’t “open”, but some other key, then use the command from that key, instead); left click on edit > command, double click on (Default), and paste the path to NPP. Exit the registry editor. (Some people say that they need to reboot, or at least log out and back in, or perform other similar actions to make sure the registry has fully updated… but my guess is just closing the registry editor and closing/reopening the third-party program will be sufficient.) In general, this should create the new “edit” action, which will execute the same command that the “open” action executes.

  • Notepad not keeping text of unsaved tab, like before.

    Locked
    3
    0 Votes
    3 Posts
    2k Views
    itrelatedI

    @decoderman

    Enable session snapshot and periodic backup, wasn’t ticked!

    It was before and i haven’t un-ticked it. No idea how it got un-ticked.

    Anyway, thanks a lot for this. I really needed it sorted.
    Have a great day!

  • R function sent from np++ to R console does not work

    6
    0 Votes
    6 Posts
    3k Views
    Frank OrellanaF

    You should also post a bug in the plugin site: https://github.com/halpo/NppToR/issues or https://sourceforge.net/p/npptor/bugs/

    Actually there’s a similar bug posted in there which might be of help to you: https://github.com/halpo/NppToR/issues/8

  • Want more user-defined keywords in Style configuration

    4
    0 Votes
    4 Posts
    3k Views
    Công Cà CuốngC

    @ decoderman

    I have tried your solution, but this field styleID=“16”, it seems to be conflicted :)

    It did not word for me :(

  • Find & Replace w/multiple instances? (using a conversion file)

    3
    0 Votes
    3 Posts
    2k Views
    Scott SumnerS

    @Perry-Sticca

    I think the fact that you didn’t give any example data in this thread, but you did in that other thread, had something to do with your lack of replies (data is power!). It happens a lot here where people just throw out a bunch of vague thoughts and hope people can read their minds and provide answers. I’m not saying that your description here was bad…but just like a picture is worth 10000 words, so is some data. :-D

  • Notepad++ and wrong ANSII encoding

    4
    0 Votes
    4 Posts
    5k Views
    guy038G

    Hi @luciferqam86, @claudia-frank and All,

    Is it better if you uncheck the Autodetect character encoding option, in Settings - Preferences… - MISC ?

    Sometimes this auto-detection causes some problems, instead of avoiding them :-D

    Best Regards,

    guy038

  • Notepad++ find written words or phrases

    13
    0 Votes
    13 Posts
    43k Views
    guy038G

    Hello, @alp-koski, @decoderman, @scott-sumner, @claudia-frank and All

    Scott, a solution, a bit complex, for marking the last duplicates, of the user’s text, could be :

    Duplicate all the text, just after the present one, by the actions Ctrl+A, Ctrl + Fin and Ctrl + V

    On that copied text, exclusively :

    Suppress all the lines, which do not have a duplicate, with the global regex replacement :

    SEARCH (?-s)^...(.+\R)(?s)(?!.*\R(?-s)...\1) and REPLACE Leave EMPTY

    Execute an ascending lexicographically sort ( Add a line break to the last sorted line, if necessary )

    Suppress all the lines, which do have a duplicate, with the global regex replacement :

    SEARCH (?-s)(.+\R)\1+ and REPLACE \1

    At this point, the copied text should contain, only, all the lines of text, having duplicate(s)

    Then, on all the file contents, perform the global mark action, with the regex :

    SEARCH (?-s)^....(.+\R)(?s)(?=.*\R(?-s)....\1)

    Finally, delete the last part ( coming from the initial copied text )

    Cheers,

    guy038

  • Replace differing text with one text

    9
    0 Votes
    9 Posts
    14k Views
    guy038G

    Hello @savey-traveller and @meta-chuh,

    I’m quite late but here is a more simple syntax, for your regex S/R :

    SEARCH \w+ +(?=GG1_4859) , with a space between the two + symbols

    REPLACE new_wagon\x20

    Notes :

    The first part \w+ + looks for a non-null range of consecutive word characters ( upper-case letter, lower-case letter, accentuated letter or digit ), followed by a **non-null range of consecutive space characters

    But, ONLY IF it’s followed by the exact string GG1_4859, (?=GG1_4859)

    If so, the word characters and space character(s), located before the string GG1_4859, are simply replaced by the exact string new_wagon, followed by a space character, \x20

    So, given the original data :

    EngineData ( gg1_4859 GG1_4859 ) EngineData ( gg1_1234 GG1_1234 ) EngineData ( hvycoach GG1_4859 ) EngineData ( hvycoach23a GG1_4859 ) EngineData ( gg1_4872 GG1_4872 )

    you should obtain the text, below, where, only, the lines 1, 3 and 4 have been modified -:))

    EngineData ( new_wagon GG1_4859 ) EngineData ( gg1_1234 GG1_1234 ) EngineData ( new_wagon GG1_4859 ) EngineData ( new_wagon GG1_4859 ) EngineData ( gg1_4872 GG1_4872 )

    Best Regards,

    guy038

  • Starting to learn HTML initial questions

    Locked
    3
    0 Votes
    3 Posts
    2k Views
    MarkInEvergreenM

    To be clearer, I start my learning today so there’s not much about an editor that I would assume.

    Not finding a reset or specific HTML setting I checked off options that seemed to be applicable. I did set tag completion.

    I added a reloader extension.

    Thanks for the tips–appreciated.

    Mark

    Thanks for the tips.

  • Notepad++ cannot open xml files even with the xml tools plugin installed

    Locked
    4
    0 Votes
    4 Posts
    4k Views
    Claudia FrankC

    @Question2

    yes, I can edit xml without a problem.
    By disabling plugins I mean rename the …\notepad++\plugins directory so it cannot
    find any plugins. Depending on your configuration it is either the one under %APPDATA%\notepad++ or the one under INSTALLDIR\notepad++.

    Cheers
    Claudia

  • 0 Votes
    3 Posts
    3k Views
    guy038G

    Hello, @luthando hanana, @gerb42 and All,

    If we supposed that :

    All your lines, normally, begin by an number-id, followed by a | character

    Some of them are stuck to the previous one, with the syntax |number-id|

    you could use the regex S/R, below :

    SEARCH \|(?=\d+\|)

    REPLACE \r\n ( or \n if you’re using an Unix file )

    Notes :

    The Vertical Line character, |, must be escaped to be seen as literal, because it’s a special regex character

    The search regex looks for a single Vertical Line character, \|, ONLY IF it’s followed by some digits \d+ and a second Vertical Line character, \|

    In replacement this Vertical Line character is, simply, replaced by a line break

    Best Regards,

    guy038

  • switching between virtual desktops

    Locked
    2
    0 Votes
    2 Posts
    1k Views
    Claudia FrankC

    @Duncan-Fraser

    yes, unfortunately a known issue and has been reported already but doesn’t have high priority.
    One user mentioned that this happens only if Settings->Preferences->Misc->Minimize to system tray is checked - maybe you wanna give it a try.

    Cheers
    Claudia

  • Unicode Combining Characters

    5
    0 Votes
    5 Posts
    6k Views
    guy038G

    Hi, @gstavi,

    Of course, I’m quite agree with you ! N++ users doesn’t care, most of the time, about good appearance of exotic diacritical marks.

    And yes, I noticed, for instance, that, with Microsoft Word 2002 SP3, some usual diacritical characters, as U+0307 , U+030f , U+0311 and U+0325, are not represented, with my Times New Roman font, although they are well displayed in Notepad++, with the similar font !

    Note that, when you write, in a true UTF-8 BOM encoded file, within N++, the string ab, with a diacritical mark on the a letter, that is to say the string âb, it’s, really, a set of three independent characters and when you select it, you do get a three-characters selection !

    The letter a ( U+0061 ) + the combining circumflex accent ( U+0302 ) + the letter b ( U+0062 )

    You may search for any of them, with the syntaxes \x{0061}, \x{0302} and \x{0062} and when you hit the right arrow key, you’ll be convinced of these 3 characters !

    In Microsoft Word, the well displayed letters, with their associated diacritical mark are, logically, considered as an unique character !

    See also the difference with the simple â letter, of the C1 Controls and Latin-1 Supplement Unicode block, which represents an unique character, of Unicode code U+00E2

    Cheers,

    guy038

  • Copy or extract only part of text

    Locked
    2
    0 Votes
    2 Posts
    15k Views
    guy038G

    Hello @tanja-correl,

    Hum…, You don’t speak about the number of your files and about their average size

    Moreover, do you mean that, in all your files, you’re looking for the id-numbers, in the exact line, as below ? ( dots refer to any text )

    Story URL:......................./id-number/.../

    If so ( I mean, only one zone /…/ after the id-number till the end of line ), here is my first attempt :

    Firstly, recopy all your files in a new directory ( IMPORTANT )

    Start N++ and open the Find in Files dialog ( Ctrl + Shift + F )

    In the Find what: zone, type the regex (?s-i).+\RStory URL:(?-s).+/(.+)/.+/$(?s).+

    In the Replace with: zone type \1

    In the Filters zone choose *.txt or your own extension

    In the Directory zone, indicate your new directory, containing a copy of all your files

    Check the Regular expression search mode

    Now, click on the Replace in Files button and valid the Are you sure dialog

    => Each file should only contain, from now on, the id-number of its Story URL line

    Now, :

    In the Find what: zone, type the simple regex .+

    In the Replace with: zone, type, for security, the regex $0

    Click on the Find All button

    => The Find result panel should appear, with all the id-numbers, in line 1, of all the files

    Finally, to get all the id-numbers, in an unique file, two solutions are possible :

    First solution :

    Right click, on any part of the Find result panel and select the Select All option

    Right click, again, on any part of the Find result panel and select the Copy option

    Open an N++ new tab ( Ctrl + N )

    Paste the previous selection, in that new tab ( Ctrl + V )

    => The id-numbers, exclusively, are recopied !

    Second solution :

    Right click, on any part of the Find result panel and select the Select All option

    Hit the classical Ctrl + C shortcut

    Open an N++ new tab ( Ctrl + N )

    Paste the previous selection, in that new tab ( Ctrl + V )

    => This time, each id-number, and the name of their associated file, are written !

    Notes on the initial regex :

    From the very beginning of file, due to the modifiers (?s-i), the regex .+\RStory URL: grabs all characters ( included EOL ones ), till EOL character(s), followed by the string Story URL:, in that exact case

    Then, due to the modifier (?-s), the regex .+/(.+)/.+/$ looks for the remainder of the Story URL line, catching, with the parentheses, the id-number (.+) in group 1

    The final part (?s).+ matches all the lines, after the Story URL line, till the very end of the current file

    So, in replacement, all the contents of each file are simply replaced by the unique id-number \1

    Best Regards

    guy038

  • No external changes noted before file saved?

    Locked
    3
    0 Votes
    3 Posts
    1k Views
    Ben VorisB

    I would expect Notepad++ to reliably inform me that the file was changed.

  • File size limit on the notepad ++ 7 X64 ?

    Locked
    4
    0 Votes
    4 Posts
    8k Views
    Claudia FrankC

    @Gontran-Aberdeen

    welll in theory it can be changed. If you replace INT_MAX by _I64_MAX and some code to
    refelct the int to int64 changes you get a max of 9223372036854775807 bytes.
    But no one has done this yet.

    You could give it a try and ask here for an enhancement.

    Cheers
    Claudia

  • How can I control font when printing?

    4
    0 Votes
    4 Posts
    5k Views
    PeterJonesP

    As Gogo said, for the body of the text, font is the same as what’s in the window. Thus, it’s influenced by the settings in the Settings > Style Configurator, including the Language: Global Styles > Style: Default Style > Font Style: Font Name, but actually it applies all the same formatting you see in your editor (including the various stylings for the various elements of whatever language you have selected). If you have the Settings > Preferences > Print set to Colour: ☑ WYSIWYG, it will even print in color (if you have a color printer), so dark-theme users, beware.

    If you don’t like the display size vs print size (ie, if you make a small font size due to printing, but it makes it too small to see on your ultra-high-def-giant-screen-monitor), you could either change the Style Configurator font size every time you print and change it back when done, or use View > Zoom > ... to change the size of what’s displayed.

    Hope this helps.

  • Function List has Stopped Working in Notepad++ v7.5.1

    Locked
    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • Change process name (or compile Notepad++)

    Locked
    1
    0 Votes
    1 Posts
    939 Views
    No one has replied
  • Regex is driving me up the wall

    Locked
    2
    0 Votes
    2 Posts
    1k Views
    Scott SumnerS

    @Anthony-Bouttell

    One problem is that your use of .* is grabbing too much. You’ll want to change that to .*? which will match the minimum amount. And then the *.* looks too much like CMD shell wildcard/globbing…

    I’m away from Notepad++ at the moment so I can’t actually try it out, but maybe something like this will work, or at least give you a boost:

    Find-what zone: ISNULL.*?\]
    Replace-with zone: $0,''

    In words: match ISNULL through the immediately following closing bracket, replace the match with what was found (represented by $0) plus a comma and two single-quotes.