• UDL folded comment spontaneously unfolds

    2
    0 Votes
    2 Posts
    233 Views
    PeterJonesP

    @Blind-SQuirreL ,

    Yep, my experiments show the behavior. You have found yet another bug in UDL. Too bad there have been no bug fixes or feature improvements in UDL in years, so even if you made an official bug report, I doubt anything would ever happen with it. (There are other longstanding UDL bugs dealing with comments and folds. FOr example, if you have one or more single-line comments at the beginning of the file, any folding that happens afterward might be off-by-one-or-more-lines from where it should be.)

    As a workaround, I suggest not using the multi-line comment definition if you want to fold that section of text; instead, use Folding in Code Style 1 if you can – or Style 2 if you’ve already used Style 1 (and are able to have newlines or spaces before and after your { and } indicators ).

  • Scroll and search through keyword lines by alphabetical order?

    4
    0 Votes
    4 Posts
    303 Views
    Alan KilbornA

    @Alan-Kilborn said in Scroll and search through keyword lines by alphabetical order?:

    ^\w-$

    I intended it to be ^\w+-$ but the + got lost somehow. :-(

  • How to convert scientific notation to standard?

    8
    0 Votes
    8 Posts
    2k Views
    Mark OlsonM

    This regex will capture all scientific notation numbers, and can also handle leading + signs and number with leading decimal points:
    ([+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?)

    Seriously, everyone should just write that down somewhere so they can look it up in times of need.

  • Unicode 'ÿ' , problem converting to Hex 'FF'

    36
    1 Votes
    36 Posts
    4k Views
    rdipardoR

    @LanceMarchetti said in Unicode 'ÿ' , problem converting to Hex 'FF':

    int val = static_cast<unsigned char>(selText.getChar(i));

    I’m afraid this type cast will corrupt data if any character ordinal is greater than 0xFF, e.g. ġ. See, for example:

    Fix character truncation bug that lead to ‘ġ’ styled as an operator since its low 8 bits are equal to ‘!’

    selText.getChar already returns an int, which is 32-bits wide, so more than enough for any ASCII or Unicode ordinal.

    The real issue is the declaration of SelectedString::_str as char *, which limits every representable “byte” to a maximum ordinal value of 0x7F. It should be the generic TCHAR * type, which becomes wchar_t * when the _UNICODE compile-time definition is set (as it always has been ever since Notepad++ became a Unicode application about 17 years ago). A wchar_t is 16 bits, which would accommodate “extended” 8-bit ASCII as well as the East Asian double-byte character sets that remain popular with some users.

  • Replacing many occurences of different text blocks

    8
    0 Votes
    8 Posts
    1k Views
    PeterJonesP

    @No-Nope said in Replacing many occurences of different text blocks:

    npp-user-manual page on regular-expressions, but I only found references to the tabs in the seearch/replace dialogue.

    Interesting. Yes, there are 68 matches, and the ones near the top of the Searching page are all about which tab of the Find/Replace/Mark dialog you are on – but that’s because the user interface for searching is what’s described first in the Searching page.

    But as soon as you go into the actual Regular Expression section of that page, it’s the third match (the other two being “table” and “comfortable”), and it’s a line that literally uses the word “tab” four times.

    5062f77a-de74-42bf-9fcb-420d42bcd147-image.png

    I’d make it easier to find if I could, but I don’t see any way to better help people find the regular expression syntax for the tab character than to put it in the section on regular expressions and use both “tab” and “character” in the description. I’m sorry that wasn’t enough for you to find it.

  • 0 Votes
    4 Posts
    249 Views
    dr ramaanandD

    @PeterJones OK, thanks, I could manage the rest.

  • remove text

    11
    0 Votes
    11 Posts
    1k Views
    TN MCT

    @Mark-Olson thank you, sir for explaining. I would be lying if I say I understand. But I promise to go through it carefully and try to learn. Thank you for your time and detailed description.

  • import libreries notepad++ in a python script

    3
    0 Votes
    3 Posts
    569 Views
    Michael VincentM

    @Ismael-Santana said in import libreries notepad++ in a python script:

    I installed NppExc to run python

    My guess without seeing any of your installation or how you did the things you say you did is that you need to updated your NppExec script to use the python.exe that is in the virtual environment; otherwise, you are just running the system Python, where presumably, you do not have pandas installed.

    Cheers.

  • After Update to 8.6.2 it takes 2 sec. to load any file

    4
    0 Votes
    4 Posts
    388 Views
    xomxX

    @Helmut-Mueller

    From what Notepad++ version you have upgraded to the v8.6.2?

    Can you go few versions back to where the error does not show up like that? This could help us to determine a specific change in the N++ code causing this problem. Try with portable versions from the N++ repository.

    Close heidiSQL, Open File: ok
    Start heidiSQL: Open File: 3 sec

    Maybe you could also ask here if there is not a possible file IO conflict in between the N++ and heidiSQL.

  • Finding out install location - could you try on cmd?

    7
    0 Votes
    7 Posts
    2k Views
    mpheathM

    @OpossumPetya said in Finding out install location - could you try on cmd?:

    C:\>for /f "tokens=2 delims=REG_SZ" %i in ('reg query HKLM\SOFTWARE\Notepad++ ^| findstr /i /l /c:"Default"') do @echo %i 2> NUL C:\Program Files\Notepad++ C:\>

    delims operates on characters, not words so a path that contains any character of R, E, G, _, S, Z will echo a incomplete path. For example in a batch file:

    for /f "tokens=2 delims=REG_SZ" %%A in ( 'echo (Default^) REG_SZ C:\Program Files\rReEgG__sSzZ' ) do ( echo %%A )

    echoes C:\Program Files\r as R is a delimiter and e is the next token.

    This is what I have tried so far to echo both x86 and x64 install paths of Notepad++

    setlocal if defined ProgramW6432 ( set "bit=/reg:32 /reg:64" ) else ( set bit="" ) for %%Z in (%bit%) do ( for /f "tokens=1,2,*" %%A in ( '2^>nul reg query HKLM\Software\Notepad++ /ve %%~Z' ) do if "%%~A" == "(Default)" if "%%~B" == "REG_SZ" ( if not "%%~C" == "(value not set)" ( echo "%%~Z" "%%~C" ) ) )

    It also echoes the bit arg to let you know where the data came from. The bit arg will be empty if ProgramW6432 is not defined. I cannot specify if the bit arg is valid on Windows Vista or XP as no records available and do not have a VM for those OSes setup currently to test.

  • reset search results window to what it was originally

    5
    0 Votes
    5 Posts
    297 Views
    PeterJonesP

    @Zephaniah-Waks-0 said in reset search results window to what it was originally:

    how can i mark this as solved

    This forum doesn’t have a mechanism for marking something as “solved”.

  • Cambio de color del fondo del editor

    4
    0 Votes
    4 Posts
    72k Views
    RobetutoR

    Para el Modo Oscuro: Settings>Dark Mode

  • Split at "Mark" into new file

    2
    0 Votes
    2 Posts
    203 Views
    Mark OlsonM

    @Andria-Baunee
    Nobody can help you unless you provide more specific information, like some example data and a detailed explanation of what you want.

  • Find > Selection Mode Extended; Help About

    7
    0 Votes
    7 Posts
    1k Views
    Alan KilbornA

    @TechnicalSup said in Find > Selection Mode Extended; Help About:

    I don’t understand how to use it.

    Sorry, I really can’t spend my time trying to help people that can’t follow instructions I’ve already provided. Good luck to you.

  • Strange Tab order when opening multiple files

    4
    0 Votes
    4 Posts
    586 Views
    mkupperM

    This should be split out into a new thread as it’s not a v8.6.4 regression.

    @Gianluca-De-Gluck - At “2 - some files are automatically opened at app startup” isn’t Notepad++ started? If so, what is the tab order?

    Regarding "3 - two or more files are selected in the desktop (anywhere by Windows file manager) and then opened by right click menu’ “edit with notepad++”

    If from Windows File manager you right click and select “edit with notepad++” then Notepad++ will select the file/tab if it is already opened within Notepad++. If the file is not yet open then a new tab is added to the right for this file.

    If from File Manager you select two or more files and then do “edit with notepad++” then the results are less predictable. One of the files selected in File Manager will become the active tab in Notepad++. All of the files will be tabs in Notepad++. The ones already opened in Notepad++ will be somewhere in the list of tabs and the newly opened ones will e on the right.

    I suspect you were hoping or expecting that Notepad++ would shift newly opened files to be the rightmost tabs. That is not the case. This behavior has not changed and I don’t think it has ever changed.

  • Adding File Types

    5
    0 Votes
    5 Posts
    4k Views
    Lycan ThropeL

    @PeterJones ,
    Thanks, @PeterJones , I didn’t know that either. Although it never really bothered me much doing the Save As and putting the extension on, I usually create my files in the dBASE IDE to create the forms and method stubs, and then edit the methods with Notepad++ when I’m working on making a program work in the IDE at the same time, because I don’t have to close NPP like I do the IDE editor to run the program. It makes compile,run,edit much quicker to work on the code of the program, that way. I just tried the language switch, and it did start using my UDL without even having to name the file first, so…kudos for the tip. :-)

    I started to answer @Fred, but realized the File Associations might not have been what he was looking for, so I deleted it.

  • How to use VS Code keymap in Notepad++?

    2
    0 Votes
    2 Posts
    2k Views
    PeterJonesP

    @Ooker ,

    You would have to figure out the mapping between every VSCode command, and its Notepad++ equivalent, and then figure out how to translate the VSCode keymap syntax into Notepad++ shortcuts.xml syntax, using that mapping table. It would be a huge effort.

    As far as I know, no one has ever posted in this Community forum that they have such a mapping already, so you’d likely have to do this yourself.

    (For some reason, I doubt that you’ll be willing to…)

    Sorry to be the bearer of bad news.

    The article FAQ: List of Notepad++ key combinations, available for shortcuts doesn’t seem to provide anything.

    If you had said “it doesn’t answer my question”, that would have been at least accurate. As it stands, that phrasing claims that there is no information in that FAQ, when in reality, there is lots of information in that FAQ, which has proven useful to many people – it’s just not the information you were looking for. But since the FAQ specifically says it’s about the key combinations available to shortcuts, I think it accomplishes exactly what it claims.

    That FAQ doesn’t have anything specific on the shortcuts.xml file format, because that format is already documented in the User Manual’s Config File Details, and our FAQs aren’t going to replicate the entire User Manual, as they serve two different purposes.

  • 0 Votes
    2 Posts
    2k Views
    dr ramaanandD

    @Srinivasan-k-d Simple, type Srini\RVasan in the Find what field and Srini Vasan in the Replace with field, tick the Regular expression mode and hit Replace, you will get Srini Vasan. Then, type Sachin\RTendulkar in the Find what field and Sachin Tendulkar in the Replace with field, tick the Regular expression mode and hit Replace, you will get Sachin Tendulkar. If there are some white spaces in between Srini and Vasan and Sachin and Tendulkar, use \s* instead of \R. Then, press ctrl + h (Shortcut for replace). Then, in the Find what zone, type ^\R ( for empty lines only) or ^\h*\R ( for empty lines with blank spaces only) and leave the Replace with zone empty. Then, tick the Wrap around option. Then, select the Regular expression search mode. Then, click on the Replace All button and all the blank lines will be removed.

  • search doesn't find words outside the view anymore

    3
    0 Votes
    3 Posts
    236 Views
    Joan BosJ

    @pnedev Thank you for the info.

  • Edit 1 line and another line gets edited as well (copy - pasted text)

    7
    0 Votes
    7 Posts
    661 Views
    PeterJonesP

    @A-Former-User said in Edit 1 line and another line gets edited as well (copy - pasted text):

    I’m gonna revert to 8.5.8 until they provide a option to deactivate it.

    Already exists. Notepad++ v8.6.3 and v8.6.4 have Settings > Preferences > Editing 2 > ☑ Enable Multi-Editing, as mentioned in the v8.6.3 and v8.6.4 announcements and already updated in the User Manual.