• Printout with marking

    2
    0 Votes
    2 Posts
    230 Views
    PeterJonesP

    @Hans-Jürgen-L ,

    That issue is being addressed in the official issue tracker.

  • Can't update from the program anymore

    2
    0 Votes
    2 Posts
    196 Views
    PeterJonesP

    @Brian-Owens said in Can't update from the program anymore:

    why is this

    It’s explained in the user manual.

    https://npp-user-manual.org/docs/upgrading/

  • help for quotes please

    4
    0 Votes
    4 Posts
    254 Views
    guy038G

    Hello, @bastien-allouard, @peterjones and All,

    I’ve got a solution which needs the installation of the excellent BetterMultiSelection plugin, from @dail ! So :

    Open the menu option Plugins > Plugins Admin...

    Select the BetterMultiSelection plugin

    Click on the Install button

    Click on the Close button

    For security, close and restart Notepad++

    Now, assuming that you have this INPUT text :

    Hyping "Hyping" Fulfillingcontract "Fulfilling contract" Time-limit "Time-limit" Requiredquality "Required quality" Upfront "Upfront" Whendone "When done" Penalty "Penalty" Costperbug "Cost per bug" Bugpenalty "Bug penalty" Latepenalty "Late penalty" Qualitypenalty "Quality penalty" Cancelpenalty "Cancel penalty" Netprofit "Net profit" Delivered "Delivered" Maxbandwidth "Max bandwidth" Lookagain "Look again" LookAgainPrompt "Are you sure you want to look again? It will cost {0}" Hyping "Popularité" Fulfillingcontract "Contrat rempli" Time-limit "Limite de temps" Requiredquality "Qualité requise" Upfront "Avance" Whendone "A la livraison" Penalty "Penalté" Costperbug "Coût par bug" Bugpenalty "Pénalité des bugs" Latepenalty "Pénalité de retard" Qualitypenalty "Pénalité de Qualité" Cancelpenalty "Pénalité d'annulation" Netprofit "Profit net" Delivered "Livré" Maxbandwidth "Bande passante Max" Lookagain "Actualiser" LookAgainPrompt "Êtes-vous sûr de vouloir actualiser ? Cela vous coûtera {0}"

    First, let’s change any tab char by the corresponding space chars with the menu option Edit > Blank Operations > TAB to Space

    Select all the lines, English and French

    Open the Replace dialog ( Ctrl + H )

    SEARCH (?-s)^(\h*).+?"

    REPLACE \1"

    Tick the Wrap around and In selection options

    Select the Regular expression search mode

    Click on the Replace All button

    You should obtain the OUTPUT text below :

    "Hyping" "Fulfilling contract" "Time-limit" "Required quality" "Upfront" "When done" "Penalty" "Cost per bug" "Bug penalty" "Late penalty" "Quality penalty" "Cancel penalty" "Net profit" "Delivered" "Max bandwidth" "Look again" "Are you sure you want to look again? It will cost {0}" "Popularité" "Contrat rempli" "Limite de temps" "Qualité requise" "Avance" "A la livraison" "Penalté" "Coût par bug" "Pénalité des bugs" "Pénalité de retard" "Pénalité de Qualité" "Pénalité d'annulation" "Profit net" "Livré" "Bande passante Max" "Actualiser" "Êtes-vous sûr de vouloir actualiser ? Cela vous coûtera {0}"

    Enable, if necessary, the BetterMultiSelection plugin

    Do a zero-length rectangular selection of all the lines ( Hit, simultaneously the Alt and Shift keys and press the Down key, several times )

    Release all the keys, then hit the End ( or Fin ) key

    => All the cursors should be at the end of lines

    Hit the Enter key to insert blank lines, in between

    Hit the Backspace key to delete the tabulations ( IMPORTANT )

    Hit the Esc key to disable your rectangular selection

    You’ll get this OUTPUT :

    "Hyping" "Fulfilling contract" "Time-limit" "Required quality" "Upfront" "When done" "Penalty" "Cost per bug" "Bug penalty" "Late penalty" "Quality penalty" "Cancel penalty" "Net profit" "Delivered" "Max bandwidth" "Look again" "Are you sure you want to look again? It will cost {0}" "Popularité" "Contrat rempli" "Limite de temps" "Qualité requise" "Avance" "A la livraison" "Penalté" "Coût par bug" "Pénalité des bugs" "Pénalité de retard" "Pénalité de Qualité" "Pénalité d'annulation" "Profit net" "Livré" "Bande passante Max" "Actualiser" "Êtes-vous sûr de vouloir actualiser ? Cela vous coûtera {0}"

    Now, redo a zero lengh rectangular selection of the french lines only, including the blank ones

    While keeping pressed the Alt and Shift keys, hit the End ( or Fin ) key to include all text

    Press the Ctrl + X shortcut, to move that text in the clipboard

    Hit the Esc key to disable the rectangular selection

    Now, move the caret at the very beginning of the first blank line, under the line "Hyping"

    Hit the Ctrl + V shortcut

    => Wow ! you should get this OUTPUT text, below :

    "Hyping" "Popularité" "Fulfilling contract" "Contrat rempli" "Time-limit" "Limite de temps" "Required quality" "Qualité requise" "Upfront" "Avance" "When done" "A la livraison" "Penalty" "Penalté" "Cost per bug" "Coût par bug" "Bug penalty" "Pénalité des bugs" "Late penalty" "Pénalité de retard" "Quality penalty" "Pénalité de Qualité" "Cancel penalty" "Pénalité d'annulation" "Net profit" "Profit net" "Delivered" "Livré" "Max bandwidth" "Bande passante Max" "Look again" "Actualiser" "Are you sure you want to look again? It will cost {0}" "Êtes-vous sûr de vouloir actualiser ? Cela vous coûtera {0}"

    Finally, do the last regex S/R, below :

    SEARCH (?-s)^(\h*)"(.+)"\R\h*(.+)

    REPLACE \1\2\x20\3

    This regex selects two lines and rewrites all chars of the first line, but the double quote chars. Then, changes the EOL, between the two lines, with a space char and, finally, rewrites the contents of the second line

    So, you should get your expected OUTPUT text :

    Hyping "Popularité" Fulfilling contract "Contrat rempli" Time-limit "Limite de temps" Required quality "Qualité requise" Upfront "Avance" When done "A la livraison" Penalty "Penalté" Cost per bug "Coût par bug" Bug penalty "Pénalité des bugs" Late penalty "Pénalité de retard" Quality penalty "Pénalité de Qualité" Cancel penalty "Pénalité d'annulation" Net profit "Profit net" Delivered "Livré" Max bandwidth "Bande passante Max" Look again "Actualiser" Are you sure you want to look again? It will cost {0} "Êtes-vous sûr de vouloir actualiser ? Cela vous coûtera {0}"

    Best Regards,

    guy038

  • Copy and paste between two files

    7
    0 Votes
    7 Posts
    2k Views
    Martin SteinerM

    @PeterJones
    OK, I’ll try it. Thank you.

  • Ersetzen mit Wildcard, wie?

    3
    0 Votes
    3 Posts
    2k Views
    Alan KilbornA

    @Bernd-Gebhardt

    Maybe try:

    Find: width=“800” hight=“\d{3,4}” border=“0”
    Replace: width=“80%” border=“0”
    Search mode: Regular expression

    Note: Because you didn’t follow the RULES for posting such a question, I don’t know what “kind” of double-quotes you have, so you may have to adjust that.

  • PythonScript to replace TextFX Rewrap function?

    19
    0 Votes
    19 Posts
    2k Views
    Reiner BühlR

    @Ekopalypse Yes, this version seems to work fine! Many thanks!

  • Associate or open workspace files

    4
    0 Votes
    4 Posts
    1k Views
    BlitzCoderB

    Thanks guys, will look into this config.xml file format more.

  • New shortcuts of document management not displaying correctly

    10
    0 Votes
    10 Posts
    681 Views
    Zyggy StardustZ

    @PeterJones

    OK, did as you suggested but that was a no go. Enabling or disabling Direct Write did not made a difference.

    Anyway, thanks 4 you suggestion…

  • How to achieve that compare layout please?

    9
    0 Votes
    9 Posts
    2k Views
    Francois BlaisF

    Wow, HxD is exactly the tool for hex files comparison I needed, thanks much!

    François

  • Is there any way to disable Full Screen?

    3
    0 Votes
    3 Posts
    2k Views
    James TrentonJ

    @PeterJones

    Thank you!!! It works. I have been wondering that for many months now. I appreciate your help.

  • VDHL Block comment adding incorrect delimiter

    4
    0 Votes
    4 Posts
    2k Views
    PeterJonesP

    @Mike-Tyson said in VDHL Block comment adding incorrect delimiter:

    should, as OP is suggesting, revert to block-commenting with “–” on every line, as this is backward compatible

    I maintain that it is already configurable, and my post from a year ago already explained how to configure it. If this is not sufficient for your needs, you are free to put in a feature request (as explained in this FAQ), as we can do nothing about changing the codebase in this Community of fellow users of Notepad++

  • Setting to clear previous search results before files search?

    7
    0 Votes
    7 Posts
    4k Views
    Alan KilbornA

    The feature @Rayhaan-Sahib mentions was added in 8.0 with THIS change.

    As 8.0 was released on 2021-06-07, the discussion earlier in this thread predates that.

  • Keep only last word of each line

    2
    0 Votes
    2 Posts
    705 Views
    Alan KilbornA

    @Vinc-Cser

    Find: (?-s)^.*?(\w+)$
    Replace: ${1}
    Search mode: Regular expression

  • Make NP++ colour scheme to match that of Chrome Developer Tools?

    2
    0 Votes
    2 Posts
    321 Views
    PeterJonesP

    @Scotty-Fitz ,

    You are correct. The codebase that Notepad++ uses for syntax highlighting HTML and related languages applies the same styling to all attributes, so it doesn’t treat the class attribute differently.

    There is an “EnhanceAnyLexer” plugin which can be installed from the Plugins Admin, and it will allow you to define a regex which will look for class="..." and style that text differently than other attributes.

  • New UserDefinedLang - code fold must begin at margin

    4
    1 Votes
    4 Posts
    353 Views
    EkopalypseE

    @gibberishbc

    This is indeed an older thread, your recent threads are others.

    As for the fake return statement, assuming a language doesn’t have start and end tokens like if and endif but does have comments, which is the case in most programming languages, you could use the start token if and a end token like #endif, where # is actually a comment.
    This way, the language itself is still happy when it is executed, and npp (or UDL) knows where to break.

  • find at and copy text to the end of a different line

    4
    0 Votes
    4 Posts
    298 Views
    Alan KilbornA

    @Sibusiso-Dlomo

    So, before text is:

    line 1 line 2 line 3 Name Catch me line 5 Slogan If You Can line 7

    and after text is:

    line 1 line 2 line 3 Name Catch me If You Can line 5 Slogan If You Can line 7

    You could do:

    Find: \A(?-is)(?:.*\R){3}.*\K(?=\R(?:.*\RSlogan(.+)))
    Replace: ${1}
    Search mode: Regular expression

    Other solutions are definitely possible.

  • reGex Find copy and replace to a new line.

    3
    0 Votes
    3 Posts
    397 Views
    Evangelos KosmasE

    Thank you for your direct responce.
    It works great.

    Its perfect

    Thank you again
    Evangelos

  • Find/Replace Regex?

    4
    0 Votes
    4 Posts
    1k Views
    Terry RT

    @Jörg-Winkel said in Find/Replace Regex?:

    It does, however, do exactly what I need today, so thanks a lot for your help.

    I thought I might follow up with some more information as I don’t think you realise how powerful/loose the use of the \D actually is. This post is also for others hoping to learn something.

    \D means “not a digit” which sounds okay until you consider that it really means ANY character that isn’t a digit. So alpha’s are certainly part of that group as the OP wanted. However it also includes punctuation characters such as ;:"',.? and if you see my image, it will include line feed and/or carriage return characters. So ANY character except for the 10 digit ones.
    7c8348e5-542c-4197-b295-b2999b988889-image.png
    The example in the image is admittedly made up on purpose to highlight the power of the \D but it shows how a regular expression (regex) can select other strings in error if one isn’t aware of what it means. Also note that I included a 3 non-digit plus 7 digit string in the example. Again the regex selected the portion it was required to find, that of the 6 digits following the 3 non-digit string. So the 7th digit was excluded. This means upon editing the string we finish up with ;#AB234567;8. I would say that’s a definite error. If only 6 digit strings were to be selected, a test at the end of the find expression would look for 1 or more digits and based on the criteria, either exclude that string or include all of it.

    I’d say this is a prime example of a loosely made expression very likely to have unwarranted side effects.

    Those who do create regexes for others take this into account and is often what we spend more time on, the “edge cases”. Edge cases can be likened to programming where 20% of the code does the work and 80% of the code is error checking. The percentages do vary according to who you talk to but the sentiment still exists across the programming world.

    Terry

  • Document List vs NP++ sessions

    1
    0 Votes
    1 Posts
    144 Views
    No one has replied
  • How to force UDL change to take effect

    7
    0 Votes
    7 Posts
    584 Views
    gibberishbcG

    @PeterJones
    Good catch - thanks!