• Toolbar doesn't remain 'fluent'

    3
    0 Votes
    3 Posts
    232 Views
    Terry RT

    @traderttt9 said in Toolbar doesn’t remain ‘fluent’:

    Anyone?

    It almost sounds like you have 2 problems.

    When opening a file that has the association, instead of opening Notepad++ first and then the file, you get 2 different results with the toolbar. This sounds like the association is opening a different (installed) version of Notepad++ on the PC. The way to identify that is to run Notepad++ each way, then check the “Debug Info” under the ? menu. It will tell you where the program is located. Alternatively one of the methods may be running Notepad++ with some commandline parameters which may be wrong. Again, see the “command line arguments” under the ? menu.

    You refer to making a change, then checking during a later session and the changes have reverted, or at least don’t appear to have changed and stuck. This could be because you are running Notepad++ in “multi instance” mode (see settings, preferences, multi instance & date). If so, then the last instance which closes will set the settings for the next time you run Notepad++. So make the changes in that instance before closing. It may also occur if you do NOT have the ability to alter the XML file holding this configuration change. So you would need to check on the XML files, stored either in the %appdata%\Notepad++ folder, or where the Notepad++ executable file is located, depending on how you run Notepad++. Check the file permissions, that you can write to the files.

    Terry

    PS, just noted @PeterJones thinks exactly the same!

  • How to replace characters over certain number?

    6
    0 Votes
    6 Posts
    2k Views
    L

    @guy038 said in How to replace characters over certain number?:

    (?-s).{55}\K.+

    Thank you very much, everything worked great. Tidy lists please the users :-)

  • Search help

    9
    0 Votes
    9 Posts
    4k Views
    PeterJonesP

    r 8 unknown y@y 4 unknown then .ro

    r********y@y****.ro

    How would i do this

    You would apply the knowledge you learned from my previous freebie solution and try to generalize it. Since . obviously matched a single character in my previous answer, using a . in your new expression anyplace you want it to match a single unknown character would work.

    (?i-s)\br........y@y....\.ro

    The (?i-s) says “be case insensitive; don’t let . match newline” The \b says “match a word boundary” (hence requiring the r at the - beginning of the email, rather than just in the middle) Every . means “one character” – and because of the earlier option, it actually means “one character (not including newlines)” the \. means “match a literal dot character” – I changed to this because that will require four unknowns followed by a literal dot; y.....ro would work for that portion of the regex as well, but it would also match y12345ro, which you don’t want, so I made it more specific.

    BTW: this is your last freebie from me. Until you start showing some effort and a willingness to learn, I cannot help you any further.

    ----

    Please note: This Community Forum is not a data transformation service; you should not expect to be able to always say “I have data like X and want it to look like Y” and have us do all the work for you. If you are new to the Forum, and new to regular expressions, we will often give help on the first one or two data-transformation questions, especially if they are well-asked and you show a willingness to learn; and we will point you to the documentation where you can learn how to do the data transformations for yourself in the future. But if you repeatedly ask us to do your work for you, you will find that the patience of usually-helpful Community members wears thin. The best way to learn regular expressions is by experimenting with them yourself, and getting a feel for how they work; having us spoon-feed you the answers without you putting in the effort doesn’t help you in the long term and is uninteresting and annoying for us.

  • How to remove text on a specific line across different files

    7
    0 Votes
    7 Posts
    427 Views
    guy038G

    Hello, @stealthy, @terry-R and All,

    @stealthy, a simple solution would be to use the following regex S/R :

    SEARCH (?-s)\A.*\R\K.*

    REPLACE 0

    Now, we can generalize, using the generic regex S/R below, in order to replace the line N, of EACH file, with the RR regex replacement expression :

    SEARCH (?-s)\A(?:.*\R){N-1}\K.*

    REPLACE RR

    Note that, if we want to replace the first line, in EACH file => N - 1 = 0. So, simply use the regex S/R : (?-s)\A.* !

    Best Regards

    guy038

  • functionList not ignoring comments

    26
    2 Votes
    26 Posts
    2k Views
    Lycan ThropeL

    @mpheath ,

    After going over a lot of stuff, including reexamining the FunctionList FAQ, I have to agree with you, that at present, I may need to work with the parser, as is. I must have missed that ‘embedded comments’ section, or glossed over it, or didn’t relate it to the kind of comments we do as the example seemed to be an example of excessive use of inline ‘block’ comment style for an inline comment. That may be what threw me as regards that example in the FAQ.

    Moving the opening class declaration line after any block comments immediately following it, fixes the problem completely, with my recent testing. It appears, however, that as I discovered before, line comments inside a class taking up a whole line, or after code, inside a class/endclass block does indeed work as it should.

    So I guess until I get up to speed with C++ and take a crack at a fix for the block comments giving problems inside a class/endclass code block, block comments will have to be avoided.

    I do, however, feel that the simple fix for this, should be just allowing a longer string other than \{ and \} symbol characters would be a proper fix, since being able to use class and endclass in the open/close symbole elements, it would be part of the actual parser demarcation ability to know where a class starts and ends, rather than having to use regex to find all the way to the end like this regex had to do to be able to outline the structure of the class. For now, the crisis is averted until I can revisit this issue, hopefully with some C++ skills at a later date. :)

  • Notepad++ Update Error

    2
    0 Votes
    2 Posts
    1k Views
    PeterJonesP

    @Sylvester-Bullitt ,

    When I try to ping the server using ? > Update Notepad++, I don’t get a server timeout.

    There may have been temporary network routing problems, or a temporary website problem. You might want to try again.

    If it’s still having that problem, maybe you have to tell Notepad++ about a proxy between your computer and the internet – ? > Set Updater Proxy…

  • Auto add list dashes

    2
    0 Votes
    2 Posts
    487 Views
    PeterJonesP

    @The-Epic ,

    Sorry. That feature doesn’t exist in Notepad++. For language-specific things like that, the developer usually relies on someone creating a plugin that handles language-specific tasks (like the abundance of plugins that add features for XML, HTML, JSON, and the like). But I don’t know of any plugin directed at adding features for YAML.

    If you had one of the scripting plugins (like PythonScript, but there are other scripting plugins also available), you could register a function that watches for keystrokes, and does something like “if the RETURN key is hit, and the current line starts with spaces then -, then make the new line start with the same indentation and -”

  • Mark all .pdf files except zusammenfassung.pdf using RegEx

    8
    0 Votes
    8 Posts
    472 Views
    datatraveller1D

    @guy038 said in Mark all .pdf files except zusammenfassung.pdf using RegEx:

    Hello, @andreas-soraru and All,

    From your title, I would say :

    Open your file in N++

    Open the Mark dialog ( Ctrl + M )

    Untick all box options

    SEARCH (?xi-s) ^ (?! .* zusammenfassung.pdf ) .* \b \S+ \. pdf \b

    Check the Bookmark line and the Wrap around options

    Select the Regular expression search mode

    Click on the Mark All button

    Then, either :

    Click on the Copy Marked Text button

    Click on the Search > Bookmark > Copy Bookmarked Lines

    Open a new tab

    Paste the .pdf filenames or the complete lines in this new tab

    Best Regards

    guy038

  • 0 Votes
    30 Posts
    12k Views
    sky 247S

    One option could be to temporarily change the font size or zoom level of the document so that the bookmarked line fits at the top of the screen when you jump to it. You can do this by using the zoom in/out feature or changing the font size. After you have finished reviewing the bookmarked line, you can return the font size or zoom level back to its original setting.

  • How to Stop Editor Replace (Python Script) from Inserting New Lines?

    5
    0 Votes
    5 Posts
    447 Views
    M

    @Alan-Kilborn
    Oh, you’re right! Thanks again!

  • Random line search

    13
    0 Votes
    13 Posts
    862 Views
    Richard LohrR

    @Alan-Kilborn I just changed the “</Placemark” statement to “</SchemaData></ExtendedData”, and the expression works. Don’t know exactly why.

    I wonder why it is some people lose their mental acuity, while others don’t? I am an extremely serious hiker and have remained extremely strong with high endurance. If I had to make a choice, I think that I would rather lose the mental part, people understand it when you tell them that it’s because your old.

    Again, Thank you!

  • How to mix lines?

    3
    0 Votes
    3 Posts
    286 Views
    Bahaa0013B

    @Alan-Kilborn
    thanks!, I use line operations so much my first time seeing it

  • Menu bar size on ubuntu

    2
    0 Votes
    2 Posts
    453 Views
    PeterJonesP

    @Gilad-Tiomkin ,

    The menubar font size isn’t configurable inside Notepad++ – it uses your global Windows font size settings. Since you are on Wine, not Windows, you will have to look into Wine documentation for how to change the “Windows” font sizes in Wine.

  • Find All Words in Line Containing Specific String

    11
    0 Votes
    11 Posts
    1k Views
    M

    @guy038

    Awesome! Now, I have more solutions to the future problems at my disposal. Thanks!

  • Why start with only "new" tab from taskbar?

    17
    0 Votes
    17 Posts
    722 Views
    Lycan ThropeL

    @Detlev-Hochmuth ,
    Hmm…for one thing, it doesn’t look like you have the double-click hack setup to enable NPP to open files that way in either of those Debug info readouts. Apparently you got it fixed by going to your full version, and that’s nice, but that doesn’t answer the question of why you expected double clicking a file (in File Explorer presumably) to open it in NPP.

  • Help needed with text formatting

    7
    0 Votes
    7 Posts
    571 Views
    PeterJonesP

    @Till-Ehrich ,

    I started replying to the deleted post, so I saw you had problems.

    The search mode must be regular expression. Sorry that I forgot to say that.

    And since I tested with “replace all”, I forgot to mention that with the \K, it will only work with Replace All. So if you tried one-replace-at-a-time, then it won’t replace anything.

    Alternatively, you could use three groups instead of two, and get rid of the \K, so that it could work one-at-a-time.

    FIND = (?-s)^(.*? \(Acc\))\r\n(\w+) - (.*)
    REPLACE = $1; $2; $3
    SEARCH MODE = Regular Expression

    converts

    MSCI EM USD (Acc) IE00BTJRMP35 - Xtrackers MSCI World Health Care USD (Acc) IE00BM67HK77 - Xtrackers AI & Big Data USD (Acc) IE00BGV5VN51 - Xtrackers

    into

    MSCI EM USD (Acc); IE00BTJRMP35; Xtrackers MSCI World Health Care USD (Acc); IE00BM67HK77; Xtrackers AI & Big Data USD (Acc); IE00BGV5VN51; Xtrackers
  • Remove last word of each line

    9
    0 Votes
    9 Posts
    2k Views
    Lycan ThropeL

    @Terry-R ,
    Thanks, and you’re right, I learn more, by trying. I had started to use regex101.com, but for the reason you mention, some of the boost stuff throws an error in it. I think I may have used a bad character or something when it threw the error, so I went to the NPP S/R box to try out what I had. Thanks for the reasoning behind the failure. I had tried a \h, but that failed also, so…at least I have another tool in the box to understand the next time I try. :)

  • how to change email and pass to email:pass

    5
    0 Votes
    5 Posts
    2k Views
    guy038G

    Hello, @bahaa-eddin-ツ, @peterjones and All,

    The solution already provided by @peterjones is the right one and my solution would be identical or very similar !

    Best Regards,

    guy038

  • How to enable multi edit?

    3
    0 Votes
    3 Posts
    190 Views
    Bahaa0013B

    @PeterJones
    feeling idiot…
    thanks again Peter

  • sudo notepad-plus-plus (in Linux of course)

    4
    0 Votes
    4 Posts
    2k Views
    PeterJonesP

    @Dave92F1,

    I was hoping the NP++ community would have experience with this, since I gather that NP++_on_Wine is sort of the “official” way to run NP++ on Linux.

    Notepad++ is an application for Windows ; no other usage is official nor even “official”. If you can get it to work in another environment (like Wine), then lucky you.

    Elsewhere I’ve been advised that “the only way” to do this is to take ownership of the file, edit it, then restore ownership back to root. I’m not sure if that’s practical (I’d have to find a way to do it in a script).

    I am not a linux-sudo expert, but the sudo permissions should be sufficient to run a script that changes the owner of a file, makes a change, then changes it back – at least, I cannot imagine how that wouldn’t work, since root (and thus sudo) has the ability to change permissions on any file. I mean, if I’ve understood correctly, the script could probably be as simple as

    sudo chown username /etc/rc.local notepad-plus-plus /etc/rc.local sudo chown root /etc/rc.local

    Do not take my word as “golden” or “authoritative” or “official” on this. I’ve never done such a thing. And there are probably security implications of changing the owner, even temporarily.

    ----
    edit: Ooh, another idea: copy it to a temp file before changing permission, so no one else ever has permission on the real file

    sudo cp /etc/rc.local /tmp/editable.rc.local sudo chown username /tmp/editable.rc.local notepad-plus-plus /tmp/editable.rc.local sudo chown root /tmp/editable.rc.local cp /tmp/editable.rc.local /etc/rc.local

    That might be better, though there are probably still security considerations on that. Using a meaningless/random tmpfile name would probably be better than /tmp/editable.rc.local, so that it’s not obvious to an outsider watching the /tmp filestructure that the file is being used for editing rc.local