• 0 Votes
    3 Posts
    1k Views

    That did the trick, thanks!

  • Wierd characters

    Oct 28, 2023, 2:20 PM
    0 Votes
    3 Posts
    177 Views

    @Jongolo-Der-II

    Notepad++ is the wrong tool for this job.

    Try SQLiteStudio.

  • Move id number to the left side

    Oct 28, 2023, 11:43 AM
    0 Votes
    2 Posts
    161 Views

    @Deny-Firmansyah :

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

  • 0 Votes
    5 Posts
    1k Views

    @Un-Known

    Your title and example suggests that the question numbers are already correct, you just want to add a zero before them, and you say you have 325 questions; so I wonder, do you want:

    01- 02- ... 09- 010- 011- ... 099- 0100- 0101- ... 0325-

    which is what your question, taken precisely, says? Or:

    001- 002- ... 009- 010- 011- ... 099- 100- 101- ... 325-

    which is what I think @PeterJones assumed you meant?

    Also, are the numbers themselves already correct (just missing the leading zeros), or do you need to renumber, too?

    If all you wanted was to add one zero before every question number, and the pattern follows your example that all question lines, and only question lines, start with a number, then all you need is:

    From the menu, select Search | Replace; in the dialog, set:

    Find what : ^(\d)
    Replace with: 0$1
    Search Mode : Regular expression

    and use the Replace All button.

  • 0 Votes
    2 Posts
    234 Views

    @ArminRay said in UDL folding breaks halfway through the file:

    It works fine for about the first third of the file, but then breaks halfway through the file.

    Unfortunately, the UDL folding has never been perfect, and it’s been pointed out to the developer for years: nothing has ever come of such reports (or any of the other feature requests for UDL). We essentially have to live with imperfect folding for UDL, or not use it. (Some of my UDL don’t fold right even near the top of the document, if the first line(s) of the document are a comment. So it might be that a comment somewhere in your file is the culprit for breaking folding. And consider yourself “lucky” that it works for even the first 1/3 of the file.)

    If you write a Lexer Plugin, you can define the folding yourself, and it might work better for you than UDL’s built-in folding. But that’s a lot of work, and I doubt you’ll go that far.

    (Sorry, there’s not much else I can say. It’s annoying that a much-used feature of Notepad++ has essentially been left to rot, letting people use what works, but ignoring what doesn’t or what could be made better. The best I can do is commiserate with you, because I cannot offer you any hope that the UDL system will ever get better.)

  • Start Notepad++ with powershell

    Oct 25, 2023, 11:53 PM
    0 Votes
    3 Posts
    3k Views

    @_ A couple of comments (well, it turned out to be a lot more…):

    Gotcha#1 - If Notepad++ is already running then when you start a new instance of Notepad++.exe it sees that a copy is already running and will hand control to that. It does not pass along that it was started minimized. Thus Notepad++ will appear to start as a window or maximized if that’s what you already had it as. Gotcha #2 - If Notepad++ is already running, but minimized, then attempts to start Notepad++ as minimized end up both passing control to the already running copy but also activating it to a normal or maximized window. Gotcha 3 - There is another “gotcha” where if Notepad++ is running as a maximized window, you exit/close it, and then attempt to start it as minimized that Notepad++ will fire up as maximized.

    The only thing works is for you to be running Notepad++ as a non-full screen windowed application, for you to exit/close it, and then to start it as minimized.

    The second issue is your syntax for how to start Notepad++ seemed rather mangled. I don’t know if the mangling was your attempt to copy/paste a correct command into the forum or if attempted the wrong syntax to start with. I suspect you started with the wrong syntax as you mentioned “<ScriptBlock>,<No file>:line 1” etc. which is unexpected regardless of how you were trying to start Notepad++.

    The syntax I used from PowerShell was:
    Start-Process "C:\npp\npp858x64\notepad++.exe" -WindowStyle Minimized

    I got the C:\npp\npp858x64\notepad++.exe part that is inside the quotes from Notepad++’ ? / Debug info... menu. A box or window will pop up. The second line of that box for me was:
    Path : C:\npp\npp858x64\notepad++.exe
    I copy/pasted the part into the command line that I used for testing this.

    A normal installation of Notepad++ is usually in the C:\Program Files\Notepad++\notepad++.exe directory meaning people would use:
    Start-Process "C:\Program Files\Notepad++\notepad++.exe" -WindowStyle Minimized

    Again though, the gotchas mentioned above will apply regardless on if you try to start Notepad++ from Powershell, via a .lnk shortcut file that says “run minimized” or the command prompt’s START command with the /MIN option run run either the exe or shortcut. All of them will fail to be minimized if any of the gotchas I listed above apply.

    To start a minimized Notepad++ you must:

    Not already have Notepad++.exe running. That when you exited/closed Notepad++ that it had been a windowed app (not maximized) regardless on if you may have had it minimized at the time you closed it.
    It’s a rather narrow eye-hole in the needle but you can nail it 100% of the time if those two conditions exist.

    If you absolutely must start a minimized copy of Notepad++ then I would:

    Install a portable copy somewhere. Rename the portable copy of Notepad++.exe to something else such as min-notepad.exe. In your powershell script see if the min-notepad.exe process is running and if so, kill it and wait for it to terminate as we will then be updating the config.xml file. In your powershell script inspect the config.xml file for your portable copy and see if the line for <GUIConfig name="AppPosition" ... has isMaximized="yes". If so, change that to be isMaximized="no" and save it. Now you can start min-notepad.exe in minimized mode but there is still one more gotcha… You need to start min-notepad.exe with the -multiInst command line option to prevent it from locating a copy of Notepad.exe that is already running and passing control to it. The PowerShell command becomes:
    Start-Process "C:\npp\npp858x64\min-notepad.exe" -ArgumentList @("-multiInst") -WindowStyle Minimized
  • UDL specification for Ada

    Oct 26, 2023, 4:17 PM
    0 Votes
    4 Posts
    274 Views

    Thanks for your reply. I will look into those.

  • 0 Votes
    12 Posts
    941 Views

    Peter jones

    THANK YOU SO MUCH!!! that worked!

  • Any Help Appreciated.

    Oct 25, 2023, 5:48 PM
    0 Votes
    10 Posts
    681 Views

    Hello, @cal-Murphy, @terry-r, @peterjones, @alan-kilborn and All,

    Yes, Alan, I must admin that this syntax is really confusing for most people and doesn’t provide a sustential benefit, unless you use this particular syntax below :

    SEARCH (?x-is) \x20 (?# SPACE char ) \( (?# OPENING Paren. ) .+ (?# Some STANDARD chars) (?= \. [ ]Filename ) (?# ONLY IF '. Filename' after ) | (?# OR ) \x20 (?# SPACE char ) \( (?# OPENING Paren. ) [^(\r\n]+ (?# some NOT PAREN. chars ) (?= \. flac ) (?# ONLY IF '.flac' after )

    Note that I still use the \x20 syntax because the [ ] syntax does not work in this forum ??

    However, I kept my free-spacing regex as a single line to avoid the multi-lines bug in some cases !

    BTW, @cal-murphy, do you remember that you asked us, six months ago, about a similar problem, which was relative to the same bunch of data !

    Refer to :    https://community.notepad-plus-plus.org/topic/24415/copy-then-paste-elsewhere

    Cheers,

    guy038

  • In Selection now configurable

    Oct 26, 2023, 8:20 AM
    0 Votes
    2 Posts
    190 Views

    Hi,

    I think it refers to the new option in the “Searching” section of the “Preferences” dialog where you can change the number of selected characters to automatically check the “In-selection” option in the Find dialog.

    Better explanations in the user manual (https://npp-user-manual.org/docs/preferences/#searching) and the tooltip in the input field of the new option in the “Preferences” dialog.

  • 0 Votes
    5 Posts
    324 Views

    Agree.

    Also, Word scrolls the text “dumb”, while Notepad++ looks out for all sorts of things all the time, like matching brackets relative to cursor (and stuff).

    Anyway, since I admire Notepad++ so much, I had thought that also the scrolling performance must be world class. It probably is, taking all its capabilities into account.

  • shortcuts.xml

    Oct 19, 2023, 1:20 PM
    2 Votes
    6 Posts
    569 Views

    Will be fixed with the release of Notepad++ 8.5.9!

  • SQL variable font color change

    Oct 24, 2023, 4:45 PM
    0 Votes
    2 Posts
    895 Views

    @Bogdan-Linchuk ,

    By default, no.

    However, the underlying Lexilla library that Notepad++ uses for syntax highlighting does have some styles that Notepad++ doesn’t currently list in the Style Configurator, so with a small configuration change, I think you can get what you want.

    Since I’m not an SQL user, I picked the first hit when I searched the internet for SQL at-variable that gave some example SQL code, and used that for testing:

    DECLARE @TestVariable AS VARCHAR(100) SET @TestVariable = 'One Planet One Life' PRINT @TestVariable

    If I follow the “Editing Config Files” instructions from the User Manual, and edit stylers.xml as follows:

    File > Open %AppData%\Notepad++\stylers.xml
    – if you are using a specific theme, rather than the default stylers.xml theme, you will have to edit the theme in your ...<install_directory>...\themes\ThemeName.xml Go to the <LexerType name="sql" section Add a new line after <WordsStyle name="Q OPERATOR" ... /> :
    <WordsStyle name="IDENTIFIER" styleID="11" fgColor="FF0000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" /> Save Exit Notepad++ and Restart Now Settings > Style Configurator > SQL will have the IDENTIFIER line in the Style box, and you can set the color of identifiers
    81e3a63e-b0ec-46ce-b9ac-6684ac416d2d-image.png
    It doesn’t change the color of the @ symbol itself, but it seems to correctly colorize the variable’s name, anyway.

    If that’s not enough for you, then you could use the plugin EnhanceAnyLexer to define a regex like @\w+\b and define a foreground color for the whole @TestVariable expression.

    The Lexilla lexers have added new styles over the years, but as Notepad++ has updated to the newest lexers, the developers don’t go in and read all of the lexers’ source code (there are upwards of 80 lexers that Notepad++ has active) to find out of any have added style categories, and so they don’t know that they should update stylers.xml or the themes\DefaultDarkTheme.xml to make those extra styles available to users (and the other themes virtually never get updated).

    So, unless a power-user of a particular lexer goes looking through the source code of that lexer, figures out the right name/styleID pairing for any styles not available in Style Configurator, updates their copy of stylers.xml/DefaultDarkMode.xml, and then create an issue with the Notepad++ Developers to ask them to incorporate that updated definition, those new styles are not likely to ever get updated in the stylers.xml/DefaultDarkMode.xml that get distributed with Notepad++.

  • Reverse Lines

    Feb 16, 2022, 11:43 AM
    0 Votes
    13 Posts
    5k Views
  • 0 Votes
    8 Posts
    1k Views

    @PeterJones : Those plugins (…)
    @Thomas-Knoefel

    OK, good to know, I asked because I’m not a mathematician, nor have I ever used any math plugins, but it’s always worth mentioning plugins even if they turn out to be not much helpful, than not mentioning and later they turn out to be useful and no one knew/mentioned about it.

    @PeterJones : Please move any Math-and-Notepad++discussion that’s not relevant to @ Big-Smoke’s original question into that new topic.

    Besides, also I didn’t want to create a separate thread because I only wanted to post a single comment, not to create a discussion and not to litter the forum with unnecessary threads, also like I said - I don’t use math plug-ins anyway, hence I won’t participate in the discussion.

  • 0 Votes
    9 Posts
    2k Views

    excellent worked great thank you

  • Text automate activity

    Oct 23, 2023, 8:32 PM
    0 Votes
    2 Posts
    155 Views

    @Fabian-Gonzalez
    Use Search | Replace… and set:

    Find what : \R(?!\d)
    Replace with : (leave empty)
    Search Mode: Regular expression

    then click Replace All.

  • 0 Votes
    3 Posts
    256 Views

    @Coises I’m also wondering if the OP noticed or wants something done with the curly quotes on

    KAJ-000-1-1-FontStyle=“Bold” KAJ-000-1-1-FontColor=“Blue” KAJ-000-1-1-WidthCentering=“Center” KAJ-000-1-1-HeightCentering=“Center”

    @FBI-Yuuki - It’s not clear if the curly quotes in your message was due to the message board doing stuff or if the curly quotes are in your data. The Template for Search/Replace Questions offers a hint in using using ``` backticks when posting questions to this message board. Using that suggested format will make the quotes issue clearer to others.

  • Saving Style Tokens

    Oct 22, 2023, 1:06 AM
    0 Votes
    5 Posts
    1k Views

    @User123413467457 said in Saving Style Tokens:

    If I were to send this file to a friend would it send it with the UDL or would I have to do that separately?

    @Ekopalypse gave you the right answer. However, given the way you phrased that, and re-reading your original question, I think it might help you conceptually if you read this FAQ

  • 1 Votes
    20 Posts
    1k Views

    Hello, @coises and All,

    You may, also, refer to this topic, that I wrote after that a new version of the Boost regex library comes out and was available within Notepad++ :

    https://community.notepad-plus-plus.org/topic/19632/new-backtracking-control-verbs-feature-available-since-notepad-v7-7/1

    BR

    guy038