• Replace strings with specific lines content

    4
    0 Votes
    4 Posts
    309 Views
    Alan KilbornA

    @andres-garzon said in Replace strings with specific lines content:

    is there any way to put all these steps into a macro?

    IMO it would be insane to try to record that as a macro, or to even hand-edit a macro to try to do it.

    I wouldn’t have written to just say that though. I wanted to point out a specific thing as I look over the list of what Guy gave you.

    I see:

    Click on the Copy Marked Text button

    I’ve noticed that this button on the Mark window isn’t macro-recordable. :-(

    But… happily, this is the equivalent command and it IS macro-recordable:

    d8be9717-a3e2-48c5-8a07-39be38dd4e02-image.png

    As to the rest…good luck with the macroizing!

  • Secondary branches in the Function List Panel

    2
    0 Votes
    2 Posts
    487 Views
    PeterJonesP

    @kiyn ,

    The function list has one level for classes with a sub-level of functions below it, and functions not in classes go at the top level. You cannot go any deeper than that. The top-level filename root node is unchangeable.

    7c0bc437-151d-4e24-b9c8-e98f50a19143-image.png

    UserManual Function List description: https://npp-user-manual.org/docs/function-list/ Community FAQ: Function List Basics: https://community.notepad-plus-plus.org/topic/19480/faq-desk-function-list-basics
  • XML Plugin - Pretty Print

    5
    0 Votes
    5 Posts
    30k Views
    dinkumoilD

    @tiago-jorge

    … and for the records: I guess XML Tools plugin’s option Apply to all open files (available via the plugin’s menu entry) has caused this issue.

  • Execute the Current File in its ASSOCIATED Program

    5
    0 Votes
    5 Posts
    2k Views
    guy038G

    Hello, @dennis-bareis, @peterjones and All,

    Dennis, in order to open various text files with their default program ( Notepad for Windows OS ) you may also use the built-in N++ option File > Open in Default Viewer

    Once opened in N++, I could even opened a PDF file and an 7z archive by this means !

    The PDF file correctly opened, in my Microsoft Edge software, thanks to its built-in PDF viewer function

    The 7z archive correctly opened in my 7zFM Manager program

    However, the File > Open in Default Viewer option is greyed out if you try to open any picture ! Luckily, with the @peterjones method, it correctly opens the pictures in the default picture viewer : Photos !

    Best Regards,

    guy038

  • Version 8.2.1 problem with typing aide

    2
    0 Votes
    2 Posts
    521 Views
    PeterJonesP

    @nicholas-piazza said in Version 8.2.1 problem with typing aide:

    I could then just hit ENTER to complete the word. Now, when it displays the word, if I hit ENTER, the word is not filled in. Instead, a new line is created. It seems like something was broken in the update.

    If one read the release notes with every upgrade, instead of ignoring/closing that tab that shows every time you upgrade, one might have noticed this feature was changing.

    It was a design choice, because many users were complaining that when they hit enter, instead of creating a newline like would be naturally assumed, it would autocomplete to some word they didn’t want.

    The problem was that the original design defined both TAB and ENTER as the auto-completion selection key, and some people got used to one key, and some to the other – and both were annoyed that the other key was also consumed.

    In v8.2.1, they decided to make it configurable, … but default it to only accept TAB (and you could add back in or change to ENTER via the config box)

    … but that just confused people who were used to the ENTER key for ending auto-complete. So in the next version (8.3.x or 8.4, whatever it will be called), it will go back to default of having both of those checked on, and those of us who only want one key to end autocomplete instead of two will have to go make the config change.

    Please reply to this question to nickajp@comcast.net as I do not normally monitor my Google email address.

    Nope. We reply in the forum. When you signed up, if you enabled notifications, the notificatinos will go to whatever you set up in the settings. But if you want to read the response, you have to read it in the forum.

  • 0 Votes
    13 Posts
    5k Views
    Hellena CrainicuH

    @guy038

    I made a change to @guy038 regex formula, as to modify something else.

    So, If someone wants to convert the first letter of the first word at the beginning of <title> tag, from lowercase to a capital letter:

    Use this regex:

    FIND: (<title>)(.\W*)
    REPLACE BY: \1\U$2

  • Copy entire line without selecting it?

    14
    0 Votes
    14 Posts
    21k Views
    Alan KilbornA

    I updated a script method for doing this HERE.

  • Update to v8.2.1 disregards user dictionary

    4
    0 Votes
    4 Posts
    357 Views
    James F. PasquiniJ

    This probably should be a new topic, but…

    Thinking about the user dictionary. Some time ago one could open it with MS Notepad and delete the lines that had the typos… BUT you had to make sure for every line you deleted, you deducted one from the total line count. Save the file and exit Notepad, then open NP++ and you were set. For the life of me, I cannot remember which file it was. That editing was possible 2(?) years ago. Is it still possible?

  • Last session is gone after plugin install/update

    4
    0 Votes
    4 Posts
    308 Views
    PeterJonesP

    @daniel-duarte ,

    Yes, the Notepad++ developers have no control over what atrocities that particular site impose on the product, and I make no guarantee as to whether that monstrosity will function or be safe.

    Fortunately, the official download site already has a portable version, so there is absolutely no reason to download their mutation.


    I may have allowed personal opinion to affect this post. My opinion is my own, and is not meant to be understood as the opinion of the Notepad++ developers or this Community Forum. While this opinion applies to that aforementioned site, and what they do to software, especially Notepad++, I have not formed or expressed an opinion on the person or people responsible for that site.

  • HTMLTag 1.1 Plugin broken since NPP 7.7

    3
    0 Votes
    3 Posts
    1k Views
    rdipardoR

    @oddmlan,
    if you’re still using HTMLTag (or just curious to try it again), there’s finally a new version that addresses this issue: https://bitbucket.org/rdipardo/htmltag/downloads

  • Find in File use entered path (case insensitive)

    9
    0 Votes
    9 Posts
    860 Views
    gstaviG

    @PeterJones
    Follow current directory is part of “be careful with your cases”. It seems to work, probably since Windows open file dialog fixes it. Not sure exactly what will happen over SAMBA share if there are actually case conflicts.

    RightClick > Current Dir Path to Clipboard - doesn’t work. If a file was opened as described, from Find-in-Files with bad path case, Notepad++ just copies the wrong-case path it registered for the file.

  • Unnecessary characters in text editing

    5
    0 Votes
    5 Posts
    353 Views
    Б НовостиБ

    The problem is solved! Thanks!
    in the plugin NppCalc - removed activation “Active Calc”

  • Manually merge results with "compare" plugin?

    2
    0 Votes
    2 Posts
    741 Views
    PeterJonesP

    @powerbananas ,

    The Compare plugin knows nothing about nicknames. So I’m not sure what you think currently works and what you are hoping it would do that it doesn’t seem to.

    Could you show some example data, and a screenshot of how the Compare currently functions, then describe how you’d like it to actually function?

  • Creating a User Defined Language in Notepad++ based HEAVILY off HTML

    3
    0 Votes
    3 Posts
    1k Views
    Michael833M

    @peterjones Thanks for all that great information!

  • 0 Votes
    6 Posts
    4k Views
    PeterJonesP

    @gstavi said in Can't save the file after change the Encoding from "Characters Sets" to UTF-8:

    I objected to someone who said “UTF8 without BOM is stupid”. It is not!

    I had either misremembered or misread that original anecdote. Sorry for misrepresenting what had been said previously.

    And still the right solution is for Notepad++ to rework its Encoding selection and let the user have more control. The default should be something like “always assume a file is UTF8 unless it violates UTF8 rules, only then autodetect”.

    👍💯👏

  • Not able to save the file

    6
    0 Votes
    6 Posts
    6k Views
    gstaviG

    @alan-kilborn
    Yes, I browsed this code a few months ago and thought it was only for the snapshot part of the ‘if’. But now I tested and I saw I get it as well. Wonder where it saves the temporary file. I hope it get deleted afterward.

  • How to replace a specific text in lines that contains a specific word.

    17
    0 Votes
    17 Posts
    3k Views
    Alan KilbornA

    @guy038 said in How to replace a specific text in lines that contains a specific word.:

    First of all, at this time of the year, I am rather involved in ski, which is a passion of mine !

    I’m not an excellent skier, but nothing sounds better to me right now than joining you on those slopes! :-)

  • Silent install does nothing

    2
    0 Votes
    2 Posts
    296 Views
    PeterJonesP

    @detlef-jockheck ,

    Unfortunately, I don’t think you’ve given people enough to go on.

    I personally don’t use the installer options, and I’m not currently at a location where I could use the installer to test it out, so I can’t give anything specific. But some general debugging questions:

    You say “sometimes”. Do you have any hints as to when those “sometimes” are? Are you doing this installation on multiple machines, and N% of those installations are doing nothing? Or are you running the installer multiple times on the same machine, expecting it to either install or uninstall, and N% of those attempts, it doesn’t do what you expect?

  • How to remove duplicate entries in each line

    6
    0 Votes
    6 Posts
    332 Views
    zcraberZ

    @alan-kilborn Thank you.

    Changes spec after solution is provided. :-(

    Sorry about that. Next time I’ll be more specific. :)

  • 0 Votes
    3 Posts
    1k Views
    Neil SchipperN

    @golden000

    The transformations are:

    (skip 3 lines and) delete line 4 F: \A(^.*\R){3}\K^.*\R R: (empty) (skip 1st 67 lines and) delete lines 68-77 F: \A(^.*\R){67}\K(^.*\R){10} R: (empty) (skip 4 lines and) replace line 5 F: \A(^.*\R){4}\K^.* R: This is the replacement for the removed line

    Modify the {numbers} to fit your needs.

    To see how they work on the active tab, in each case, bring up the Replace dialog (Ctl-h) and set Search Mode to Reg expr, leaving the box to its right unchecked. Fill in the Find & Replace texts. With (empty) ensure there are no invisible spaces. In each case even though you maybe doing a single F&R you must use ‘Replace All’ and not ‘Replace’ (a requirement imposed by use of \K).

    Although I haven’t tested it, they should also be fine using Find in Files (or Projects). Observe good backup practices.

    If you want actual batching, so that one big operation performs all transformations in one go, you’d need a scipting language solution (that drives a sequence of regex actions from a list). Probably someone else will have a concrete suggestion.