• That mysterious ESCAPE box - UDL

    Locked
    2
    1 Votes
    2 Posts
    897 Views
    Meta ChuhM

    @Randy-DiCotti

    it defines escape characters, which disable a delimiter

    for example if you have " as start and end, but you want to write it in the middle without breaking the highlighting, you can “escape” this character or sequence with another preceeding character, usually \.

    more info: https://udl20.weebly.com/delimiters.html

  • How do I find, multiply and replace a number in notepad++?

    Locked
    3
    0 Votes
    3 Posts
    2k Views
    IVIemoriesI

    Darn, that’s a bit annoying; but at least I know throwing different brackets at the replace line won’t do anything now.

    Appreciate the help!

  • Help to replace a string

    Locked
    2
    0 Votes
    2 Posts
    483 Views
    remizikR

    I think I found a solution there :
    https://notepad-plus-plus.org/community/topic/13296/find-and-replace-everything-between-and-including-parentheses

    with this :

    https://i.imgur.com/u1CEkbx.png

    (you have to select the text 1st for some reason … )

  • Problem with Cyrillic characters

    Locked
    2
    0 Votes
    2 Posts
    615 Views
    andrecool-68A

    I do this: select everything and then copy … then convert the encoding … paste from the clipboard and save
    The most interesting why Sublime Text does not break the Cyrillic alphabet when you convert encoding?

  • How do I transfer my files into a folder?

    Locked
    2
    0 Votes
    2 Posts
    763 Views
    Meta ChuhM

    welcome to the notepad++ community, @MILDMAYHEMPVP

    if you want to avoid answers like:

    put your files on a usb drive. put your usb drive into an envelope. folder your envelope to close it. go to your local post office. declare your folded envelope as an export item and send it overseas.

    we would need more information like:

    are you using notepad++ at all ?
    (if not true press the X at the top right corner of your browser window)

    what file did you open in notepad++ ?
    (only applies if point 1. is true, otherwise point 2. will not be visible by now)

    did you open any file in notepad++ at all ?
    (only applies if 1. is true and 2. is not known to you)

    what is your definition of the terms export and transfer, as well as their difference to save a file ?
    (if you managed to read until here, we can say hooray, thanks for all the fish, and now for something completely different 😉)

  • .lic File

    Locked
    3
    0 Votes
    3 Posts
    9k Views
    PeterJonesP

    @Jay-Patel said:

    it contain text is not in readable

    It depends on what the content of the .lic file is what can open it. There are often multiple programs that use the same file extension to refer to very different kinds of data. A .lic often (but not always) implies a license file of some type.

    A site like nirsoft (where @andrecool-68 linked) lists apps that happen to deal with a file named .lic – it doesn’t say whether or not it matches your particular .lic file.

    If it’s a text-based license file (or other text-based format), then Notepad++ will be able to show you the contents just fine; but if it’s a proprietary binary format (for a license file, often used to tell commercial software that you have paid the publisher for a license; otherwise, proprietary binary data is common, no matter the extension), then either you need to use an application that can recognize that particular binary format, or understand that for some types of files (like a paid license file), the publisher doesn’t make the binary format public, because it will likely result in people trying to hack their license or proprietary data files, to steal trade secrets or gain access to applications or features that the customer has not paid for.

    We have a FAQ about some of these concepts – it focuses on why .docx and .pdf documents aren’t readable in Notepad++, but the concepts are the same.

  • fundamental question about the cursor type

    Locked
    2
    0 Votes
    2 Posts
    436 Views
    Alan KilbornA

    @Donáth-Dániel

    Press and release the Insert key

  • 1 Votes
    6 Posts
    984 Views
    MaxsteinfeldM

    @Mikhail
    THX for your great & simple workaround - it solves my prob
    i use ahk in my workflow so it was easy to add your hotkey
    greets
    Max

  • I wanna to run cmd.exe to open url in default browser

    Locked
    6
    1 Votes
    6 Posts
    3k Views
    Raymond LewR

    @kopalypse
    Thank you for the webbrowser suggestion. I tried it and it gets me 90% to my objective.
    on my PC It lauches a window in internet exploror 11, not my default browser. Thank you for the suggestion and I will look deeper down this path to see if I can change this default.

    @ PeterJones
    your code samples and comments are perfect guidance for my knowledge level.
    I have much to learn, thank you all for your responses.

  • im new at notepad++ need help please

    Locked
    7
    0 Votes
    7 Posts
    1k Views
    SinghRajenMS

    @andrecool-68 said:

    @Meta-Chuh
    Plant it horizontally))

    Super… nO cONFUSION aT aLL. :P

  • 0 Votes
    2 Posts
    467 Views
    Alan KilbornA

    @Michael-Pollard

    It sounds like a problem, surely. But for what you are trying to accomplish, have you considered

    right clicking a tab and choosing Move to Other View (then you will have 2 editing windows that you can visually compare the contents of 2 files in, right in one instance of Notepad++)

    using the Compare plugin

  • Delete last words after : at the end of each line

    Locked
    5
    0 Votes
    5 Posts
    6k Views
    guy038G

    Hello @vinc-cser, @Peterjones, and All,

    Peter, you beat me to it by a few minutes ;-)). I was thinking about these two solutions :

    SEARCH (?-s)^(.+):.+

    REPLACE \1

    OR :

    SEARCH :[^:\r\n]+$

    REPLACE Leave EMPTY

    Note that your solution :[^:]*$ does not work well when next line(s) does not contain any colon. For instance :

    happylion3872:PIFMYJD8:9kjrgmdsjf4vxlc1dkc791fsd7f878 happylion3872:PIFMYJD8:9kjrgmdsjf4vxlc1dkc791fsd7f878 Some text to see the problem happylion3872:PIFMYJD8:9kjrgmdsjf4vxlc1dkc791fsd7f878

    So, to prevent grabbing multiple lines , use either :

    My second solution :[^:\r\n]+$ , which does not accept End of line chars before an end of line

    Your solution, slightly modified, :[^:]*?$ , which looks for the nearest “end of line”  location !

    @vinc-cser, beware that running twice, any of these regex S/R, would delete the part :PIFMYJD8, as well !

    Best Regards

    guy038

  • Pixel-wise instead of line-wise scrolling possible?

    Locked
    6
    0 Votes
    6 Posts
    2k Views
    bolandrossB

    @PeterJones
    Thank you very much, I’ll look into that.

  • UDL Comment Folding

    Locked
    4
    0 Votes
    4 Posts
    951 Views
    Felix TF

    Thanks so far and also for helping with the encoding.
    I forgot to mention that regular lines can also be encoded using keywords and a dollar: $Time, $File. So a lone opening $ is not working.

  • Using Regex for special search and replace

    Locked
    2
    1 Votes
    2 Posts
    606 Views
    Meta ChuhM

    hola y bienvenido a la notepad++ community, @Jorge-García-López

    yes this is possible.

    find what: ~(.*?)~
    replace with: \\textbf{$1}
    search mode: regular expression
    wrap around: enabled

    then hit replace all

    this will change this text:

    Lorem ipsum dolor sit amet, consectetur adipiscing elit. ~Praesent~ condimentum, ligula et egestas pretium, magna nunc tincidunt mauris, at fermentum ~massa~ enim ut mi. Ut ac faucibus lacus. Donec vel est ~et~ justo posuere vulputate. Donec viverra id neque eget vehicula. Donec luctus pharetra odio vitae fringilla. Integer dictum hendrerit congue. ~Pellentesque~ maximus fermentum nulla sed pulvinar. Nulla nisi lorem, interdum ~non~ sagittis nec, posuere a massa. ~Sed~ vitae ex ac ~eros~ dapibus iaculis. Sed ~sit~ amet augue eu justo ultricies facilisis. Pellentesque rhoncus ipsum ligula, at rhoncus mi sollicitudin in.

    to this:

    Lorem ipsum dolor sit amet, consectetur adipiscing elit. \textbf{Praesent} condimentum, ligula et egestas pretium, magna nunc tincidunt mauris, at fermentum \textbf{massa} enim ut mi. Ut ac faucibus lacus. Donec vel est \textbf{et} justo posuere vulputate. Donec viverra id neque eget vehicula. Donec luctus pharetra odio vitae fringilla. Integer dictum hendrerit congue. \textbf{Pellentesque} maximus fermentum nulla sed pulvinar. Nulla nisi lorem, interdum \textbf{non} sagittis nec, posuere a massa. \textbf{Sed} vitae ex ac \textbf{eros} dapibus iaculis. Sed \textbf{sit} amet augue eu justo ultricies facilisis. Pellentesque rhoncus ipsum ligula, at rhoncus mi sollicitudin in.

  • Windows .reg recognized, but no syntax highlighting?

    Locked
    4
    2 Votes
    4 Posts
    1k Views
    ytdlderY

    Ok, I got it to work; I just asked a friend to try this…

    The “problem” is, that there is no “Registry” style; at least visible in the UI, as it IS in the XML. The same is true with my friend -> the .reg highlighting works for him, because N++ recognizes them as “.ini” ;-)

    Anyway, the solution for now (for me at least):
    o) open the Style Configurator
    o) change ANY color for any language and SAVE
    o) optionally(?) restart N++
    o) now “Registry” is visible in the Style Configurator & the highlighting works!!

    further info: when comparing the “default” stylers.xml with the newly Notepad++ saved one, then there are several differences throughout the .xml
    -> maybe it’s “damaged” somewhere?

  • UDL: Code Folding Help

    Locked
    2
    0 Votes
    2 Posts
    977 Views
    EkopalypseE

    @Christian-Major

    what exactly is the problem?

  • Default font for Devanagiri script

    Locked
    9
    2 Votes
    9 Posts
    3k Views
    guy038G

    Hello, @naachhilfe-aachen, @peterjones, @ekopalypse, and All,

    May be, this post to @v-s-rawat ( and all the discussion, of course ) could be of interest for you !

    https://notepad-plus-plus.org/community/topic/17223/why-does-appears-as-in-npp/5

    You could, as well, download the Devanagari Google Noto font, for some tests ;-))

    Best Regards,

    guy038

  • Find only files with exact two words

    Locked
    12
    0 Votes
    12 Posts
    12k Views
    guy038G

    Hello, @ronny-kerk, @andrecool-68, @meta-chuh, @ekopalypse, @alan-kilborn and All,

    Here is a general method to list all files which contains word1 AND word2 AND word3 AND … wordN. The + of that solution is it should be fast enough and that you do not need to worry about regex problems, as the use of the (?s) syntax, look-arounds, and the order of the different words to match :-))

    In addition, even if you were about to look for 3 expressions, simultaneously, with a regex, you should have to test the different ranges, below :

    Word3........Word1..........Word2
    Word3........Word2..........Word1
    Word1........Word3..........Word2
    Word2........Word3..........Word1
    Word1........Word2..........Word3
    Word2........Word1..........Word3

    Rather fastidious, isn’t it ?

    So, in short, the different steps, of that general method, are :

    Search, in Normal mode, of each expression word1, word2,…,wordN and successive outputs in the Find result panel

    Paste of all the contents of the Find result panel in a new tab

    Use of a first regex S/R, in order to keep the absolute pathnames, only

    Alphabetic sort of these pathnames

    Use of a second regex S/R, to isolate the pathnames which are present N times

    Use of a third regex S/R to delete all the other pathnames, which do not contain the N words simultaneously

    OK, let’s go :

    Open the Find ( Ctrl + F ) or the Find in Files dialog ( Ctrl + Shift + F )

    Search, successively, for the expressions word1, word2wordN

    Tick, if necessary, the Match whole word only and/or the Match case options

    Tick the Wrap around option

    Select, preferably, the Normal search mode

    Click, either, on the Find All in All Opened Documents or the Find All button

    => After the N consecutive searches, you’ll get N searches in the Find result panel

    In the Find resul panel, select all the text ( Ctrl + A ) and copy it in the clipboard ( Ctrl + C )

    Open a new tab ( Ctrl + N ) and paste the clipboard’s contents ( Ctrl + V )

    Open the Replace dialog ( Ctrl + H )

    Perform the following regex S/R, to keep, only, the different absolute pathnames

    SEARCH (?-is)^(\t|Search).+\R|\x20\(\d+\x20hits?\)$

    REPLACE Leave EMPTY

    Tick the Wrap around option

    Select the Regular expression search mode

    Click on the Replace All button

    Now, let’s sort that text, with the option Search > Line Operations > Sort Lines Lexicographically Ascending

    Add a manual line-break at the very end of that sorted list ( IMPORTANT )

    Perform this second regex S/R, to detach the only pathnames present, N times

    SEARCH (^.+\R)\1{N-1} , where N represents the number of the searched expressions

    REPLACE \1\r\n ( or \1\n if Unix files )

    Tick the Wrap around option

    Click on the Replace All button

    So, for a search of any file, containing 4 expressions/words, just use the search regex (^.+\R)\1{3}

    Finally, using the final regex S/R, below, you’ll obtain the expected list, after suppression of the unwanted pathnames, and line-breaks :

    SEARCH ^.+\R(?!\R)|\R(?=\R)

    REPLACE Leave EMPTY

    Tick the Wrap around option

    Click on the Replace All button

    You’ll get, the list of all the absolute pathnames of files containing, at least once, all the words word1, word2wordN, in any order !

    Of course, you may search for expressions more complicated than simple words, using the Regular expression search mode !

    Best Regards,

    guy038

  • Can RegEx do the work for me?

    Locked
    17
    1 Votes
    17 Posts
    5k Views
    Thomas KarlssonT

    @Ekopalypse and @PeterJones - a big BIG thanks for all your help and support.

    Eko - your regex was marked up each block, both one and tow so it did the job but at the same time not.

    PeterJones - your regex just nailed it and I’m soooo happy!! So impressed. You have know idea how much time I will save now using your regex. Previously I have search and deleted all of theses 1000 and 1000 rows manually.

    You have made my day, week, year :) Thanks and thanks in million!

    Cheers from happy Scandinavia guy :)