• Python colored syntax?

    2
    0 Votes
    2 Posts
    3k Views
    mere-humanM

    Ensure you have the language set correctly:
    67549ce2-2ac7-44bd-9504-581f67b52c4e-image.png
    It is usually done automatically if the extension is standard (e.g. *.py).

    As for the background colors, there are a lot of predefined themes for that.
    Take a look at this in menu: Settings > Style Configurator > Theme - Obsidian

  • sample config

    24
    0 Votes
    24 Posts
    4k Views
    Alan KilbornA

    @guy038 said in sample config:

    After ticking this option, in the Preferences dialog and closing N++, the value of the dlgAlwaysVisible attribute is still no in the config.xml file !

    Hmm. I would think that dlgAlwaysVisible would get erased from the FindHistory section at the N++ release that moves control to the Searching section of config.xml; example of that:

    <GUIConfig name="Searching" monospacedFontFindDlg="yes" stopFillingFindField="no" findDlgAlwaysVisible="yes" confirmReplaceInAllOpenDocs="yes" />

    Notice the name is now slightly different, too: findDlgAlwaysVisible

    But…I really don’t know how such “obsolete” items are handled.

    So , no need to create any issue

    If obsolete settings are supposed to be removed, maybe THAT’S an issue you could open!

  • batch execution

    4
    0 Votes
    4 Posts
    909 Views
    Manfred HumphriesM

    I used to write batch files and coldfusin apps, but that was long ago and far from my present mental haze… Thanks, but it looks like I’m going to load and save each file.

  • Run C++ Codes in npp

    2
    0 Votes
    2 Posts
    177 Views
    PeterJonesP

    @Ali-Abbaspour ,

    Natively, you cannot.

    Fortunately for you, this is a FAQ, “How do I use Notepad++ to Compile my Source Code”, where the example in there actually shows using the gcc compiler to compile c source code and run the resulting executable, so I believe it matches what you want to do and should be easily adapted to your compiler needs.

  • Regex help with replacement

    13
    1 Votes
    13 Posts
    459 Views
    A

    @PeterJones awesome thank you so much! Learning regex is a long marathon lol

  • 0 Votes
    9 Posts
    776 Views
    PeterJonesP

    @guy038 ,

    I don’t think that’s necessary. There’s probably enough in my post to re-create the original problem for anyone who was that curious. And I’ve left my reply public in case @jbenh ever comes back and wants the solution.

  • Python script plugin console to open multiple files

    19
    1 Votes
    19 Posts
    1k Views
    PeterJonesP

    @June-Wang said in Python script plugin console to open multiple files:

    The software I used to output my current data is unable to output unicode data

    Unicode was invented in 1991 , and UTF-8 encoding was invented in 1992 . Software developers have had 30 years to adapt. And most software I’ve seen from the last decade or so knows how to use UTF-8. Any software still under active development should have figured out UTF-8 by now; if they haven’t, and if you (or a company you work for) are a paying customer, I would start making frequent requests to find out what their schedule for upgrading from pre-1990’s technology is.

    That said, I’m glad that Notepad++ (plus plugins) is able to help you overcome this extreme deficiency in output ability of this other software. Good luck.

  • Слишком большой файл

    8
    0 Votes
    8 Posts
    5k Views
    Игорь ЗавалейИ

    Спасибо всем!

  • Calculator on line

    4
    0 Votes
    4 Posts
    8k Views
    guy038G

    Hello @monu-kashyap, @Michael-vincent, @alan-kilborn, and All,

    Here is an other solution which uses a batch file and the DOS command set /a

    Open a new N++ tab ( Ctrl + N )

    Run the menu command Encoding > Convert to ANSI

    Select all the batch file contents, below, and copy them in this new empty file

    Save it, in the system folder C:\Windows\System32, as cal.bat

    @echo OFF REM *************************************************************** REM * BATCH file "Cal.bat" for MULTIPLE calculations in ONE go * REM * * REM * Type 'cal' WITHOUT parameter or 'cal /?' for EXPLANATIONS * REM *************************************************************** REM ************************************************************************ REM * The TITLE of the DOS windows is changed as "MULTIPLE calculations" * REM ************************************************************************ title MULTIPLES calculations REM *************************************************************************** REM * color <HEX Background><HEX Foreground> sets the COLORS of the CONSOLE * REM * * REM * 0 = Black 8 = Grey * REM * 1 = Dark Blue 9 = Blue * REM * 2 = Forest Green A = Lime * REM * 3 = Dark Cyan B = Cyan * REM * 4 = Dark Red C = Red * REM * 5 = Purple D = Magenta * REM * 6 = Olive E = Yellow * REM * 7 = Light Grey F = White * REM * * REM * You may DELETE this command ( DEFAULT values of CONSOLE are '07' ) * REM *************************************************************************** color 70 REM ************************************************************************** REM * IF call WITHOUT any PARAMETER, JUMP to label "Help" for EXPLANATIONS * REM * * REM * DON'T write "%1"=="" as the PARAMETER may contain DOUBLE quotes * REM * DON'T write !%1==! as, if PARAMETER = /?, it DOESN't work, too * REM ************************************************************************** if %1!==! goto Help REM ************************************************************************ REM * IF PARAMETER = '/?', JUMP to label "Help" for EXPLANATIONS * REM * * REM * DON'T write "%1"=="/?" as the PARAMETER may contain DOUBLE quotes * REM * DON'T write !%1==!/? as, if PARAMETER = /?, it DOESN't work, too * REM ************************************************************************ if %1!==/?! goto Help echo. REM ************************************************************* REM * The DECLARED variables are LOCAL during BATCH execution * REM ************************************************************* setlocal :Deb REM *********************************************************************************** REM * The CURRENT operation in %1 is EVALUATED and RESULT is STORED in VARIABLE %r% * REM *********************************************************************************** SET /a r=%1 REM ********************************************************************************** REM * The CURRENT operation %1 and its RESULT are displayed, with 10 LEADING Spaces * REM ********************************************************************************** echo. && echo %1 = %r% REM *********************************************************** REM * The NEXT typed PARAMETER becomes the FIRST one ( %1 ) * REM *********************************************************** shift REM ********************************************************************* REM * LOOP to the :Deb LABEL for a NEXT calculation if %1 is DEFINED * REM * JUMP to the END of the BATCH, if NO MORE calculation * REM * * REM * DON'T write "%1"=="" as the PARAMETER may contain DOUBLE quotes * REM * DON'T write this SYNTAX !%1==!? as well * REM ********************************************************************* if NOT %1!==! goto Deb echo. && goto :EOF :Help REM *************** REM * HELP menu * REM *************** cls echo. echo. echo ******************************************************************************* echo * BATCH file : CAL.BAT * echo * * echo * SYNTAX : cal[ Op_1[ Op_2[ Op_3[...[ Op_N]]]]] where Op_N = ONE or SEVERAL * echo * ~~~~~~ of the 18 OPERATIONS, below, by DECREASING order of PRIORITY : * echo * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * echo * * echo * () PARENTHESES Grouping * echo * * echo * a DECIMAL value of the DECIMAL number a = a * echo * 0a DECIMAL value of the OCTAL number a = a * echo * 0xa DECIMAL value of the HEXADECIMAL number a = a * echo * * echo * -a OPPOSITE number of number a * echo * ~a Bitwise COMPLEMENT of number a = -a - 1 * echo * !a LOGICAL NEGATION of number a = 0 if a ^<^> 0 * echo * = 1 if a = 0 * echo * * echo * a*b MULTIPLICATION of a by b = a*b * echo * a/b INTEGER QUOTIENT of the DIVISION of a by b = INT (a/b) * echo * a%%b REMAINDER of the DIVISION of a by b = a MOD b * echo * * echo * a+b ADDITION of a to b = a+b * echo * a-b SUBTRACTION of b from a = a-b * echo * * echo * "a<<b" LEFT Shift of b POSITIONS of a = a * 2^^b * echo * "a>>b" RIGHT Shift of b POSITIONS of a = a / 2^^b * echo * * echo * "a&b" Bitwise AND between a and b * echo * "a^b" Bitwise EXCLUSIVE OR between a and b * echo * "a|b" Bitwise OR between a and b * echo * * echo * "var=a" ASSIGNATION of var to a var = a * echo * "varOp=a" ASSIGNATION of (var BINARY Op. a) to a var = var Op. a * echo * ( Ex : x*=7 means x = x * 7 ) * echo * * echo * * echo * a, b, r = INTEGER, in range [-2,147,483,648 +2,147,483,647], with NOTATION * echo * * echo * - DECIMAL : the DIGITS of a NUMBER belong to INTERVAL [0-9] * echo * - HEXADECIMAL : the DIGITS of a NUMBER belong to INTERVAL [0-9] or [A-F] * echo * - OCTAL : the DIGITS of a NUMBER belong to INTERVAL [0-7] * echo * * echo * * echo * NOTES : - The VARIABLE r is the RESULT of the LAST calculation PERFORMED * echo * ~~~~~ ~~~~ * echo * ==) cal a r*r*r...*r ( b TIMES the VARIABLE r ) = a POWER b * echo * * echo * - If an EXPRESSION contains some SPACES, surround it with "......" * echo * * echo * Ex : * echo * * echo * cal "-9 +3" 011*9 "17|22" "12<<5-1" "v=r*=4" (0xba+v)/6 "17&22" "17^22" * echo * * echo ******************************************************************************* Now, in your active shortcuts.xml file, add the line, below, before the end of the </UserDefinedCommands> ••• </UserDefinedCommands> node <Command name="Multiple Calculations" Ctrl="no" Alt="no" Shift="no" Key="0">cmd /c cal.bat $(CURRENT_WORD) && pause>NUL</Command>

    Close and re-start Notepad++

    Make a normal selection of that example line "-9 +3" 011*9 "17|22" "12<<5-1" "v=r*=4" (0xba+v)/6 "17&22" "17^22"

    Execute the menu command Run > Multiple calculations

    Et voilà !!

    Notes :

    Once the results read and, possibly copied in the clipboard, just hit any key to close the MULTIPLE calculations window

    If you don’t like the color of the DOS console, just change the parameters of the color command or delete it, in the batch file !

    To copy the results to the clipboard :

    Click anywhere, in that DOS window, with the right mouse button and choose the Select option

    Now, by clicking and moving around the pointer you should define a rectangular block, in the same way as a rectangular N++ selection

    Hit the Enter key to copy the contents of this block in the clipboard

    Paste these contents anywhere, in Notepad++ !

    Any selection must contain an even number of double quotes, if any. For instance, the selection 3+4 "5 - 9" 3*5 is correct, where as the selection of 3+4 "5 - 9 3*5 or 3+4 "5 - 9 are incorrect !

    Note that a single shift, logical bitwise and assignation operation, as well as any expression containing space chars, needs to be surrounded with double quotes

    Remark that the variable r always contains the result of the last performed operation !

    Just test it. I hope you’ll like it !

    Best Regards,

    guy038

    P.S. :

    I finally don’t think that the conversion to ANSI is needed, as no character of this batch file is over \x{007f}, anyway !

  • find config files that do not contain username and password

    4
    0 Votes
    4 Posts
    488 Views
  • Auto-re-registration of extensions from *.xml file on new computer?

    2
    0 Votes
    2 Posts
    196 Views
    PeterJonesP

    @Claudia-Svenson ,

    Sorry. When Notepad++ registers an extension with Windows, that information is stored in the Windows registry, not in the Notepad++ configuration. That’s how registered extensions work for any application in Windows. When you copy a Notepad++ configuration from one machine to another, Notepad++ doesn’t know that you previously registered those extensions, because that’s not saved in the Notepad++ config files.

  • Append the values to a text

    3
    0 Votes
    3 Posts
    340 Views
    Nikhil ChavanN

    @Ekopalypse Superb!! Thanks alot! It worked… :)

  • Find no longer Finds anything

    16
    1 Votes
    16 Posts
    17k Views
    Daniel Santamaria RubioD

    I had the same issue and I managed to solve it.
    You need to have regular expression tick box selected and wrap around tickbox aswell.

  • Session Manager Error every time Notepad++ is autosaving

    11
    0 Votes
    11 Posts
    4k Views
    Arnaldo CavalcantiA

    Remove the file “C:\Users<User>\AppData\Roaming\Notepad++\plugins\Config\SessionMgr\global.xml” and restart the Notepad++

  • 0 Votes
    8 Posts
    4k Views
    mere-humanM

    Also, we are now thinking about re-implementing the Set Save dialog extension filter to *.* preference behavior.
    Your feedback would be very helpful in this issue: https://github.com/notepad-plus-plus/notepad-plus-plus/issues/9515

  • Request for normal language style.

    5
    0 Votes
    5 Posts
    1k Views
    Alan KilbornA

    @Gubith said in Request for normal language style.:

    This issue seems an obvious no-brainer. My request for change stands.

    Yes, but where is the no-brain?
    How this works, as described by @PeterJones makes perfect sense to me, with perhaps a slight quibble about “normal” and “default”…but I’m not going to let that minor aspect bother me.

    You are free to request change, but if you are doing it here, you are doing it in the wrong place because no one with the ability to effect any sort of change will see it here. You need to consult the FAQ section of this site and follow advice there for making a change request.

  • How to run in local server?

    5
    0 Votes
    5 Posts
    3k Views
    Geo MeadowsG

    @PeterJones Many thanks for info. I’ll look into the command line approach.

    btw Brackets is an editor very like nppp but being phased out so I’ve been trying NPpp and Visual Studio as replacements. VS has precisely the same issue regarding using a local server as NPpp!

  • New line every n characters

    13
    0 Votes
    13 Posts
    10k Views
    Giannicola BonoraG

    I am stunned by the quantity and quality of help available in this community in a very short time! Thank you very much to everyone :)

  • Select/mark all lines which contain a certain pattern?

    27
    0 Votes
    27 Posts
    94k Views
    guy038G

    Hi, @sasumner, @peterjones and All,

    Here is a new version of my previous table, which recapitulates the range of the Replace All, Count and Mark All action , depending of the three options Wrap around, Backward direction and In selection

    Many thanks, again to @sasumner which improved the Count and Mark option, which share the same behaviour than the Replace All option ;-))

    •-------------•-------------------------------------------------------------•--------------------------------------------------• | PREVIOUS | OPTIONS in the "Find", "Replace" and "Mark" dialogs | RANGE of SEARCH/REPLACE , COUNT or MARK when | | •-----------------•------------------------•------------------• | | Selection | "Wrap around" | "Backward direction" | "In selection" | click on "Replace All", "Count" or "Mark All" | •-------------•-----------------•------------------------•------------------•--------------------------------------------------• | NO | OFF | OFF | OFF | From CARET location to END of file | | | | | | | | YES | OFF | OFF | OFF | From START of selection to END of file | •-------------•-----------------•------------------------•------------------•--------------------------------------------------• | NO | OFF | ON | OFF | From START of file to CARET location | | | | | | | | YES | OFF | ON | OFF | From START of file to END of selection | •-------------•-----------------•------------------------•------------------•--------------------------------------------------• | YES | -/- | -/- | ON | From START of selection to END of selection | •-------------•-----------------•------------------------•------------------•--------------------------------------------------• | -/- | ON | -/- | OFF | From START of file to END of file | •-------------•-----------------•------------------------•------------------•--------------------------------------------------•

    Best Regards,

    guy038

  • Help to arrange text??

    3
    -1 Votes
    3 Posts
    197 Views
    ParkourfingerP

    @guy038 Thank you very much it worked!