• Regex: Delete all signs/operator like (comma) from tags < >

    11
    -1 Votes
    11 Posts
    3k Views
  • Change a series of numbers when they start with 2

    7
    0 Votes
    7 Posts
    422 Views
    massimo la terraM

    ok grazie ;-)

  • 0 Votes
    2 Posts
    205 Views
    PeterJonesP

    Run > Launch In Edge has been deprecated for multiple versions of Notepad++.

    If you have a recent version of Notepad++ (v7.8.4 recommended; 7.8.2 had a bugfix, so I wouldn’t recommend any versions earlier than that), you should be using View > View Current File In > Edge. For me, that allows me to open my HTML document in
    41e9e816-68f4-4119-bb95-917572ea4b6c-image.png . I have no idea if that is “the newest version of” Edge or not, since I almost never run Edge.

  • converting my text in notepad++ to chrome is not converting

    6
    0 Votes
    6 Posts
    487 Views
    PeterJonesP

    @Kenneth-Keen ,

    Unfortunately, we don’t seem to be able to communicate with each other. Your words are English as are mine, but the meaning behind the groups of words seems to be getting lost somewhere. I am sorry for that.

    it tells me than an “error 2” is showing

    Given that you’re on a Chromebook, and I think Chrome (like Android) is a linux-ish OS, error 2 would normally be ENOENT, “No such file or directory”. I have no idea if that’s really the case for you.

    Just like I don’t understand how you think you are running notepad++.exe on your chromebook. Maybe you downloaded notepad++.exe and are trying to execute that natively on the chromebook, which would very much surprise me if it worked. Maybe you are trying to say that when you try to run notepad++.exe, you are getting an error 2 “No such file or directory”. That wouldn’t be the error I would expect for an executable that cannot run, but who knows.

    Can someone inform me about a code editor like “notepad ++” that is for the chromebook

    There may or may not be Chromebook users here in the Notepad++ forum. But this isn’t really the best place. You might find a forum dedicated to chromebook users, or let me google “best html code editors for chromebook” for you, where this article has a couple of suggestions, and the website looks like it might be a good resource for an apparently-new-to-chromebook user.

  • Adding text to toolbar icons

    3
    0 Votes
    3 Posts
    395 Views
    Alan KilbornA

    @Michael-Vincent said in Adding text to toolbar icons:

    turn off the toolbar

    I don’t know if I’d want to do that, although I’m not a toolbar junk, it has its uses (especially, the macro buttons, and the single toolbar button I have tied to a Pythonscript).

    use MenuSearch

    I must say, it’s an excellent plugin (having just started using it). No more hunting thru the Preferences (ugh). And, it will find my Pythonscripts and let me run them (left-click on them) or pull them into the editor (ctrl+left-click on them). This latter function really reduces the value of my "single toolbar button I have tied to a Pythonscript.

  • Returning from Post-it or Full Screen mode without shortcuts

    7
    0 Votes
    7 Posts
    13k Views
    Alan KilbornA

    @Ekopalypse said in Returning from Post-it or Full Screen mode without shortcuts:

    want only see the coding stuff

    Maybe, but at least for the way I have things set up, not much is eliminated and a lot of non-coding stuff remains.

  • Linux EOT on existing files

    6
    0 Votes
    6 Posts
    1k Views
    EkopalypseE

    @Meh-Di

    just to give you an idea how am I working with it.
    We upload parameter files to embedded devices running real time linux.
    The files are stored on a NAS running debian linux.
    Using npp on a windows PC with a mapped drive to the NAS.
    Edit, save and upload to the embedded devices from within npp.
    Never had any issue that those files got corrupted.

  • Opening A Batch File In Notepad++ In The Folder Where Notepad++ Is Opened

    4
    0 Votes
    4 Posts
    2k Views
    EkopalypseE

    @Garvit-Joshi

    Do you know NppExec plugin?
    Maybe worth to have a look.

  • Add new lines after matching lines (was:'Hello ALL')

    11
    0 Votes
    11 Posts
    736 Views
    Rajeev GuptaR

    @PeterJones said in Add new lines after matching lines (was:'Hello ALL'):

    (?-s)set @queryName = '(.)';\h(?:(\R)|\z)\K

    Hi PeterJones – Thanks a lot for your valuable time, your solution working successfully, I am new here but it’s quite interesting to learn regex.

    :) Thanks you Sir

  • trying to delet a bunch of lines

    4
    0 Votes
    4 Posts
    286 Views
    guy038G

    Hi, @alan-kilborn and All,

    Indeed, as noticed, below, in the Special characters section :

    https://www.regular-expressions.info/characters.html

    There are only 12 special regex characters and, both, the closing square bracket ] and the closing curly bracket } are not part of this set !

    Cheers,

    guy038

  • 0 Votes
    5 Posts
    382 Views
    Alan KilbornA

    @guy038

    Nice solution that really looked at solving the OP’s problem, rather than (like me) focusing on “Copy all the results from the Find window” not being macro-recordable.

  • Code Folding - how to show vertical line?

    3
    0 Votes
    3 Posts
    281 Views
    Ninon_1977N

    Hi :-)

    Thank you for your response!
    I use UDL - and after some trouble shooting I found the solution/reason for this behaviour.
    Above the text of my screenshot I had a comment called:

    "MSTART
    .
    .
    .
    MEND

    So the folding was closed but never opened.
    After I deleted the quotes before MSTART it worked.

    BG,
    Heike

  • File Cannot Be Saved and it May Be Protected

    2
    0 Votes
    2 Posts
    515 Views
    PeterJonesP

    @Rachael-Murphy ,

    I am sorry you are having difficulty.

    Unfortunately, you haven’t given us much to work with. Notepad++ can save a file that’s been opened by a browser: I just opened a file in Chrome, then changed the file in Notepad++, saved the changes, refreshed Chrome, and Chrome saw the updated file.

    That means, if you want help, you are going to have to give us more details about your version of Notepad++, where the files are stored, and the exact series of events that lead to the problem. The FAQ I linked explains how to grab some useful debug info about Notepad++, and gives hints as to other possibly-pertinent information you should include in your reply. (The FAQ was written with an old version of the Community Forum. Now, if you want to include a screenshot – like say, of the error message – all you have to do is Alt+PrintScreen the dialog, then Ctrl+V to paste it in your reply.)

  • Remove entries from second file

    12
    0 Votes
    12 Posts
    4k Views
    guy038G

    Hello, @terry-r and All,

    I said :

    I was waiting the Terry’s reply, first,…

    Because I think it is more fair to let the first guy, helping the OP, to develop his solution ;-)) Then, you can jump into the discussion, proposing alternate solutions, too !

    Besides, I know that I’m really too eager to give my regex solutions and, very often, I must prevent some people from helping their own solutions ;-))

    Now, regarding your solution, you’re right about it : best to avoid large amounts of data inside the look-ahead structure ;-))

    So, from the short example data, given in my previous post :

    one two three four five six seven eight nine ten twenty-two %%%%%%%%%% twenty-two five nineteen seven

    First, using the Edit > Column Editor... option, at column 12 or more, we would get :

    one 01 two 02 three 03 four 04 five 05 six 06 seven 07 eight 08 nine 09 ten 10 twenty-two 11 %%%%%%%%%% 12 twenty-two 13 five 14 nineteen 15 seven 16

    And , after the Edit > Line Operations > Sort Lines Lexicographically Ascending option, we have :

    %%%%%%%%%% 12 eight 08 five 05 five 14 four 04 nine 09 nineteen 15 one 01 seven 07 seven 16 six 06 ten 10 three 03 twenty-two 11 twenty-two 13 two 02

    Now, using the following regex S/R :

    SEARCH (?-s)^(.+)\x20+\d+\R\1\x20+\d+\R? OR (?-s)^(.+)(\x20+\d+\R?)\1(?2)

    REPLACE Leave EMPTY

    We are left with :

    %%%%%%%%%% 12 eight 08 four 04 nine 09 nineteen 15 one 01 six 06 ten 10 three 03 two 02

    Then, moving back the numbers from the end to the beginning of line and adding a space column, with the column mode selection, we would obtain :

    12 %%%%%%%%%% 08 eight 04 four 09 nine 15 nineteen 01 one 06 six 10 ten 03 three 02 two

    And, after a last ascending sort, we have :

    01 one 02 two 03 three 04 four 06 six 08 eight 09 nine 10 ten 12 %%%%%%%%%% 15 nineteen

    Finally, after processing this last regex S/R, we get our expected text, removing leading numbers and trailing spaces as well as anything from the separation line till the very end of file :

    SEARCH (?s)^\d+\h*%%%+.+|^\d+\h*|\h+$

    REPLACE Leave EMPTY

    one two three four six eight nine ten

    Cheers,

    guy038

  • Shuffle text lines

    2
    0 Votes
    2 Posts
    2k Views
    Terry RT

    @Michael-Weet said in Shuffle text lines:

    shuffle text lines

    Welcome to the NPP forum. I first have to say your sentence “nicely sort lines ascending or descending” contradicts the request to “shuffle” especially when the link refers to a random sort.

    You should be aware that an ascending or descending sort can easily be done with “Line Operations” which is under the “Edit” menu. However random sorts aren’t possible in NPP without additional help from plugins or one of the supporting programming languages.

    Might I suggest you read the posts:
    https://community.notepad-plus-plus.org/topic/16318/sorting-lines-evenly-in-document
    as that might give you some direction.

    As a very rough simile to “randomness” considering grabbing 2 characters at different positions within each line, copying these to the start of the line, then sorting. Then those characters could be removed, thus leaving a “sort-of” random ordering of the lines.

    Terry

  • user-defined syntax highlighting

    5
    1 Votes
    5 Posts
    450 Views
    Ninon_1977N

    Thank you!
    It works when I define operator 1 as follows: -.
    :-)

    BG,
    Heike

  • File Association gave me more than I bargained for

    8
    1 Votes
    8 Posts
    471 Views
    EkopalypseE

    @Alan-Kilborn
    found some discussion from the community.
    I still haven’t found the problem, maybe it was the linked post
    I mistakenly thought was reported as a problem.

  • Patching?

    2
    0 Votes
    2 Posts
    201 Views
    EkopalypseE

    Notepad++ is an standalone Win32 application. No client/server concept.
    The application itself does get updated whenever Don, the author of npp,
    sees a need to do so.

  • CSV file first field check

    12
    0 Votes
    12 Posts
    689 Views
    SofistanppS

    Hi @Wally-Kempf

    Maybe I’m assuming too much, but if you want to get rid of those false line wraps, extend @Alan-Kilborn 's regex as follows:

    Search: (?s)(\R)(?!"\d{6}",) Replace: \x20

    which produces this two-lines outcome:

    "040339","0006","013","Amherst at City View","","","","","","HOUSTON","TX","77060","17103 IMPERIAL VALLEY DR","227","75.00","8.000000","AI","gate code 2070","","1","","","","","","","","29.946850","-95.396846","1.00","","","174350" "041217","0001","001","PALM BEACH ESTATES ","","","","","","HOUSTON","TX","77060","16818 CITY VIEW PL","227","76.00","8.000000","AI","GATE CODE 1454 SECTION 1 GATE CODE 1453 ACROSS THE STREET ENTRANCE IS ON CITY VIEW OFF BENMAR","","1","","","","","","","","29.934018","-95.396125","1.00","","","174325"

    Best Regards.

  • Notepad++ Run a Batch File From Current Directory

    14
    1 Votes
    14 Posts
    4k Views
    PeterJonesP

    I will try this and will surely tell you if it worked

    It wasn’t so much a “worked” as “we need to see what Notepad++ is sending to the command processor to figure out what’s going wrong”.

    But with the bit of information, it’s irrelevant now:

    I used %cd% to go to the directory… but cd /d "%~dp0" should be used in case of opening batch file

    Yes, the /d makes sense. I tend to forget that changing directory and drive using cd is more difficult; I primarily use single-drive systems (well, at work, we have network drives mapped to letters, but I’m almost never cd-ing into those directories)

    The %~dp0 changes the batch/script name to just be a drive and folder… but since in the NotepadPlusPlus user-commands, you don’t have a batch/script filename, and $(CURRENT_DIRECTORY) already gives what you want (just the drive and folder), you don’t need that part.

    So, the command you need is

    <Command name="Java_Executor" Ctrl="no" Alt="no" Shift="no" Key="0">cmd /k cd /d &quot;$(CURRENT_DIRECTORY)&quot; &amp;&amp; &quot;D:\Projects\Java\Executor_Java.bat&quot;</Command>

    Note: I also put quotes around $(CURRENT_DIRECTORY) as well, in case it has spaces in the path.

    BTW: Thanks for linking to the SO thread; when asking a question in multiple forums, it’s polite to crosslink both right away, so people can see whether it’s already been answered in the other location, or can learn from the other community’s responses.