• SQL variable font color change

    2
    0 Votes
    2 Posts
    1k Views
    PeterJonesP

    @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

    13
    0 Votes
    13 Posts
    7k Views
  • 0 Votes
    8 Posts
    3k Views
    F

    @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.

  • Auto insert break text every x amount of lines

    9
    0 Votes
    9 Posts
    3k Views
    Andrew CaseyA

    excellent worked great thank you

  • Text automate activity

    2
    0 Votes
    2 Posts
    255 Views
    CoisesC

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

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

    then click Replace All.

  • Search line that start with " but not close with "

    3
    0 Votes
    3 Posts
    603 Views
    mkupperM

    @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

    5
    0 Votes
    5 Posts
    2k Views
    PeterJonesP

    @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
    3k Views
    guy038G

    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

  • Automatic indent on next line

    3
    0 Votes
    3 Posts
    333 Views
    Nicholas Piazza 0N

    Got it! Thanks!

  • recognize file with "UDL"

    3
    0 Votes
    3 Posts
    608 Views
    Ninon_1977N

    @Ekopalypse Thank you very much - I will give it a try.
    BR,
    Heike

  • Pythonscript plugin / console not working

    19
    2 Votes
    19 Posts
    3k Views
    Fuel DZNF

    @PeterJones Thank you, resizing the panel just fixed it. I don’t know why it didn’t work before.

  • Changing to Dark Mode changes the tab icons

    3
    0 Votes
    3 Posts
    355 Views
    Rei Da TecnologiaR

    Ok, thanks for replying. I will go for the hacky method then.

  • Can't get autoComplete to work with UDL

    3
    0 Votes
    3 Posts
    465 Views
    J

    @PeterJones said in Can't get autoComplete to work with UDL:

    The auto completion XML filename must match the name of the UDL, not the extension.

    Thank you for this. I was under the impression it had to be the extension name. I changed the name and it works now. Thanks again.

  • Input hex 0x1F

    3
    0 Votes
    3 Posts
    1k Views
    Mark OlsonM

    HtmlTag version 1.4.0 allows you to automatically replace a character with any hex value by just hitting &#x<hex value>; followed by the space key.
    Before hitting space:
    26152252-dec8-4d05-b80b-ba74a87ead4c-image.png
    After hitting space:
    ad151fb8-96ca-4d4a-9de2-9831ecf98771-image.png
    Incidentally, this (with 09 as hex value) is my preferred way of inserting a literal tab character when automatic tabs-to-spaces conversion is enabled.

  • FTP and managing local files - connect local and server files?

    3
    0 Votes
    3 Posts
    870 Views
    Joel ShortJ

    Thanks for the reply. I’m looking for an alternative to Dreamweaver because I have an old version (CS4) and it appears to be no longer compatible with Windows 11. After a Windows update DW is very unstable. The only thing I used DW for was a little bit of HTML editing and FTP upload.

    I came across a prior discussion regarding the Global Cache idea but I’m not sure I want to mess around with that. No worries, I think I’ll go with something else, like Coffeecup HTML editor.

  • Deploying NPP with intune

    2
    0 Votes
    2 Posts
    5k Views
    PeterJonesP

    @Vinny-Arena ,

    InTune’s behavior is outside of our control. There aren’t a lot of InTune users who frequent here, though occassionally, we get an InTune-related question – most of which we haven’t answered to anyone’s satisfaction.

    If InTune is using an MSI (and my memory of those past discussions vaguely says that InTune does want MSI – as mentioned here), then you should know that per this statement, the developer does not support MSI installation at this time (and will not do so until there is a free converter from NSIS to MSI), so if it’s using an MSI, it must be using an unofficial MSI build; neither the developer nor any of the regulars in this forum can guarantee or warrantee or support any MSI installation or non-official build of the installer or software, as we cannot control what other people do.

    Previous discussions:

    Notepad++ InTune Install Cannot load 32bit plugin even when 64bit versions of all are installed Convert to MSI
  • Trying to remove a line with only year #### for text

    4
    0 Votes
    4 Posts
    1k Views
    DawnD

    @PeterJones I have heard about the macros before but I have not edited any or really worked with them from notepad++.

  • PRINT without columns

    3
    0 Votes
    3 Posts
    262 Views
    Lycan ThropeL

    @Howdee-Doodee ,

    If you mean…the numbers on the left, those are line numbers, not column numbers, and this picture should show you what you need to do.

    StopNumbersPrint.PNG

  • Stuck in [Administrator] mode

    20
    0 Votes
    20 Posts
    5k Views
    I

    After trying the solution on the superuser discussion linked above, I found a solution to this problem:

    Right-click on the notepad++.exe file, select Properties. Click on the Compatibility tab, and select “Run this program in compatibility mode for:” and select “Windows 8”. Make sure “Run this program as an administrator” is unchecked. Click OK.

    However, this work-around was not working when I tried to run Notepad++ via an AutoHotKey shortcut; it still ran as Administrator. So here is another work-around using Windows Task Scheduler:

    Open the Windows Start menu, search for “task scheduler”, and run that. Click on the “Task Scheduler Library” item in the tree view on the left. Click on the Action menu, then “Create Task…”. Type in a name for your task. Under the General tab, click the “Change User or Group…” button. Type in “Users” in the “Enter the object name to select” box and click OK. Click on the Actions tab, then click on the “New…” button. Click on the “Browse…” button, and find your notepad++.exe file and open that. Click on the Settings tab and make sure “Allow task to be run on demand” is checked. Click OK. To make a batch file to run this scheduled task, you can put this command in a text file and name it with a “.bat” extension: schtasks /run /tn *<name of your task from step 3 here>*
  • Remove all but specific phrase/line containing changing value.

    10
    0 Votes
    10 Posts
    2k Views
    Alan KilbornA

    @jrdn-bautista said in Remove all but specific phrase/line containing changing value.:

    I just pasted directly from the code and I didn’t know what to edit to make it work correctly

    This is why we have that FAQ entry.