• Refresh/review button

    6
    0 Votes
    6 Posts
    467 Views
    Khal RashidK

    @Terry-R Hi Terry,
    I took your earlier advice and left NP++ in original state. And today, lo-and-behold I can preview my work without having to make changes.
    Thank you for your advice.
    Khal

  • HELP!!! Multiple context menu entries

    11
    0 Votes
    11 Posts
    1k Views
    Nandini CDN

    @Victorel-Petrovich Thank you for sharing this. I uninstalled the current version and downloaded the latest version and This fixed both the issues.

  • different plugins for different unprivileged users w/ one install?

    13
    0 Votes
    13 Posts
    1k Views
  • Convert quote marks straight to curly on html pages

    5
    0 Votes
    5 Posts
    1k Views
    Dazel andpointcomD

    Haha! Thank you for the detailed answers. I was hoping for a simpler solution than regex, as I understand very little about it. However, it went surprisingly well…

    It’s very basic, not 100% accurate solution but close enough. I edited by hand the dozen that were left next to a HTML tag (<a>, <li>, <i>).
    I’ll leave it there in case somebody else has the same need in the future:

    Step 0: Make backup!

    Step 1:
    \s" replaced by \s“ (catches all opening quotes after a space, so no HTML “code” should be hit, and replaces them)

    Step 2:
    “([^“]*)” replaced by “\1” (replaces closing quotes)

    I use the French version:

    Step 1:
    \s" replaced by \s« 

    Step 2:
    «([^“]*)” replaced by «\1 »

    And for the apostrophes:
    ([a-zA-Z]|[à-ü]|[À-Ü])'([a-zA-Z]|[à-ü]|[À-Ü]) replaced by \1’\2 (every apostrophe between two letters, to avoid hitting things in javascript, accented letters included for French)
    Then by hand, I replaced the few that were left (no regex):
    '<i> --> ’<i>
    '<a --> ’<a

    @ Mark Olson
    No idea what a parser is, nor XML… Anyway my typography is saved now.

  • 0 Votes
    4 Posts
    329 Views
    OpossumPetyaO

    so I ran the “scan disk” (which is chkdisk), it reported no errors, but now it works as it did originally. wow

    anyways, thank you @PeterJones , looks like I’m all good for now.

    P.S. btw sorry I didn’t mention in the original msg, I’m using stdin/stdout mode with my tool, just to complete the picture.

  • Adding a vertical column to the right side

    4
    0 Votes
    4 Posts
    1k Views
    PeterJonesP

    @MachineThatGoesP1NG ,

    maybe there was some sort template that i could apply to text files.

    Notepad++ doesn’t have a builtin templating system. I use the QuickText plugin, available through Plugins Admin. Then, in the QuickText settings, I would pick the right language (if you’re using a UDL instead of a builtin language, I think you pick “External” from the dropdown, but I’ve never tried that). You can then define a new quick-text keyword, and then in your document, you’d use type the quick-text keyword then use the assigned keystroke for QuickText completion (I think TAB is the default; I change mine to Ctrl+Shift+Enter, because TAB has too many important meanings to me to be also used for this function).

    In the languages that I use, I have a QuickText entry called “start”, so I would type start then the keystroke (or Plugins > QuickText > Replace Snip), and get my starter template.

    But I’m guessing what you really want is “I want to be able to take my existing code and add the column easily”. Since macros don’t know how many lines are in your file, if I were doing it for me, I would be tempted to pull out the PythonScript plugin, and code up something that would add the veritcal-bar comments to all the lines in the file.

    with shift tab to push them back

    Shift+Tab works for shifting the first non-space characters of a file back one tab-stop (honoring your language’s tab settings for using either n spaces or the actual tab character). But for something that’s later on the line, I would again just recommend using the column-mode editing (either via Alt+Click as I said before, or using Edit > Begin/End Select in Column Mode for long files – use that once to set it at the beginning, then Ctrl+End to get to the end of the document, move the caret to the right column of the last line, and use it again to end the selection) and then delete that selection to move it left (or do one or more TABs or spaces to move right)

  • Remove duplicate lines not possible?

    24
    0 Votes
    24 Posts
    4k Views
    Alan KilbornA

    @endolith said in Remove duplicate lines not possible?:

    It depends on the text?

    Could be a line-ending problem?
    If line-endings are different on otherwise duplicate lines, they won’t be considered true duplicates.

  • notepad++ editing and searching

    2
    0 Votes
    2 Posts
    167 Views
    Mark OlsonM

    @Gen-Gen
    If none of your passwords or the domain names to which they correspond contain a colon (literal :), this is an easy find-replace:
    FIND: .+:([^:]{8,15})$
    REPLACE WITH: ${1}
    Regular expression ON.
    Example:
    Converted

    PYUTGPBQzTM@LZsJeXV.pDNTx:IBge1O9h 8Ej4Yvadj4m.NJr:DqSyjWpm bN6wc76fo4n@YYyqy.USPao:vcoT7KF584g OMm7PAVs9iy4.xTCQ:Sz4iAC02 qH7BVQxhor.jwxZ:6Oyb8nuPjW lKgyhCKKu@flBQpAB.rRXmG:2o9mtT9boc8bg0 G41wuU.VIT:Q4TDoVqIe5o3I gGNBYv8abkJ.rlev:YA9duaEwmG G3nVFy@repHcft.RfhM:N70Gnr6YcYIm hr9Fa8YnJHG1@MjZKlEo.NGxF:qZYmosMf7KFnq KuhwiopHHu.BpLR:YUqNT0dLBX MenK6RKfL@JzcbtFd.Qelr:sXSRBOg0q MskMswpfCsZa.cJBX:dISQwNJn2EIo ayx3xXUw4f@mOHliOF.GTrIo:HpEigj5In0 msGP447Um@KplNWkgB.LsfJ:oM2ZdFe8P GtSojZe8.ZBQJ:UzbBJdos8I2e MMUkZ3EX@apVKI.FEUK:vf1fG2bmHeYtbFT RPxo3RX8sdH@RIQGxFPXMh.HfS:b6d8qOSNkq u1OuDyumF2W.DmAR:40FyTgDi5PFTal4 nQBU7X@xAXZgvN.YIpr:CduOg6J83gI

    into the stuff after the colon, i.e

    IBge1O9h DqSyjWpm vcoT7KF584g Sz4iAC02 6Oyb8nuPjW 2o9mtT9boc8bg0 Q4TDoVqIe5o3I YA9duaEwmG N70Gnr6YcYIm qZYmosMf7KFnq YUqNT0dLBX sXSRBOg0q dISQwNJn2EIo HpEigj5In0 oM2ZdFe8P UzbBJdos8I2e vf1fG2bmHeYtbFT b6d8qOSNkq 40FyTgDi5PFTal4 CduOg6J83gI

    If any passwords or domain names contain a colon, this becomes much more irritating, and I’d have to give it a good think.

    FWIW this task becomes trivial if you used a horizontal tab (as in, the character from the Tab key) to separate passwords from domain names, because horizontal tabs are never allowed in passwords or URLs.

  • Notepad++ crashes (or immediately exists) when starting

    4
    0 Votes
    4 Posts
    342 Views
    PeterJonesP

    @Will-Pittenger said in Notepad++ crashes (or immediately exists) when starting:

    @PeterJones Seems to be JsMapParser.NppPlugin. Doesn’t seem to be a newer version. I have 4.2 and that’s the latest.

    At this point, you need to submit an issue with the plugin developer/maintainer. While waiting for a resolution, your options are to forgo using that plugin, or to downgrade to an old-enough Notepad++ to be compatible with that plugin.

  • connect notepad to gaming console

    6
    0 Votes
    6 Posts
    860 Views
    PeterJonesP

    @Gabr-Care ,

    So you are talking about this screenshot here?

    b51c17e9-5b44-479d-abe4-99f57798fff8-image.png

    The video is showing using Notepad++ to code in Python. It is not Notepad++ which is responding to the video game – it’s the python code which is doing something. So they used Notepad++ to edit some script (which they showed very briefly). They were then presumably running that script using the python interpreter to somehow interact with the video game. So what you’re really asking is “how do I code in Python to interact with video game X on my Switch or other Console?”. And the answer to that is, “you learn the Python programming language; then you find out whatever system that video’s creator is using to interface their python code with their game, and learn how to use that system and library; then you type the code in Notepad++, then you have to run that code through whatever system they were using”.

    From a “how it works” perspective, it’s got nothing to do with Notepad++ – whether you use Notepad++ or Atom or VSCode or MS notepad.exe to type your code – the coding techniques are completely independent of the editor. So, as I told you in December, to type the code (the only part that has anything to do with Notepad++), “You open a file in Notepad++ and start typing.” To know what to type is up to you, hence I pointed you to our FAQ (https://community.notepad-plus-plus.org/topic/15958/faq-desk-you-ve-asked-your-question-in-the-wrong-place) which explains why we are not going to be able to teach you to code in this forum, just becasuse you want to use Notepad++ to do the coding.

  • "This file has been modified by another program"

    3
    0 Votes
    3 Posts
    457 Views
    PeterJonesP

    @rdipardo said in “This file has been modified by another program”:

    still the only documentation

    Sorry, I didn’t know about that flag-file.

    I just created an issue and will add the notes from that commit message to the User Manual, so it will be described in the next release of the Online User Manual.

  • Syntax Highlighting (BASH/shell) question/bug

    6
    1 Votes
    6 Posts
    3k Views
    Michael VincentM

    @Trevor-S said in Syntax Highlighting (BASH/shell) question/bug:

    @Michael-Vincent Yes indeed, thanks!

    Great! Then if you’re comfortable, upgrade now since 8.5.5 is available; otherwise, wait for the autoupdate usually about 7-10 days after the release - if all goes well.

    No need to mark the question answered, it just stays like this for posterity.

    Cheers.

  • How to see .htaccess file in directory tree

    4
    0 Votes
    4 Posts
    528 Views
    PeteNorrisP

    @PeterJones

    Mr. Kilborn, Mr. Jones;

    Thank you for responding.

    I added the -al to the “LIST Parameters:” box under the FTP Misc. tab and it now works fine.

    Thanks again for the information.

    PN

  • Keep hidden lines hidden

    9
    1 Votes
    9 Posts
    2k Views
    mkupperM

    @Gideon-Addai said in Keep hidden lines hidden:

    I have a long script file which I edit from time to time, and its annoying to use the search function every time to go to a certain line. It would be nice to keep hidden lines hidden, any ideas?

    I get around that issue by taking advantage of that Notepad++ already has the -n command line option to open a file at a specific line number or to jump to that line if it’s already open. Notepad++ does not have a similar command line option to go to a specific line based on a search of the text in the file I want to open. To get around this I first figure out the line number and then use Notepad++'s -n command line option when opening the file.

    Here is a trimmed down batch file script:

    set XFILE=c:\path to the text file set "XTAG=The tag or anchor within the text file I want to go to" findstr /n /c:"%XTAG%" "%XFILE%" >"%TEMP%\~nptag1.txt" if errorlevel 1 goto :tag_not_found sed -r -n -e "s~^([0-9]+):.+~set XLINE=\1~p" "%TEMP%\~nptag1.txt" >"%TEMP%\~nptag2.bat" if errorlevel 1 goto :sed_failed set XLINE=1 call "%TEMP%\~nptag2.bat" "%ProgramFiles%\Notepad++\Notepad++.exe" -n%XLINE% "%XFILE%"

    The script first uses findstr to return a list of lines with their line numbers that match XTAG. If desired, I could use findstr’s /r option for the crude regular expressions that findstr supports.

    The script then uses GNU sed to extract the line number(s) from the findstr results and to convert those into a .bat file line that sets the XLINE variable for each line found. If more than one line matches XTAG then there will be more then one line in the temporary batch file meaning we will jump to the last XTAG found. If that bothers you then you can add logic to deal with this.

    The script then calls the temporary batch file to set the XLINE environment variable.

    Last is the line that runs Notepad++ and opens the text file at the desired line number. If you are using a 32-bit installation of Notepad++ on a 64-bit machine then use %ProgramFiles(x86)% instead of %ProgramFiles% in the last line or replace it with the path to your copy of Notepad++ (The full path is in Notepad++'s ? / Debug info... results in the Path: line.)

  • No results in "print" python command

    4
    0 Votes
    4 Posts
    323 Views
    David ZevallosD

    @Alan-Kilborn tks a will do

  • Using Mark (Markers) and Styles

    34
    1 Votes
    34 Posts
    19k Views
    Alan KilbornA

    @Victorel-Petrovich said in Using Mark (Markers) and Styles:

    the conclusion is that this feature is broken (if I can break it so easily).

    it is easy to get the UI out of sync just using the built-in features (no scripting).

    Ah, OK – I thought you meant something with the script.
    Yes, the feature is very broken, for many reasons.
    This has long been known.

  • I need help with deleting specific lines

    4
    0 Votes
    4 Posts
    280 Views
  • Replace a specific char with the begining of the line

    3
    0 Votes
    3 Posts
    1k Views
    Axel BlitzA

    @PeterJones said in Replace a specific char with the begining of the line:

    Peter Jones you saved my day !!
    Thank you very much <3

  • Plugin installation don't works

    8
    0 Votes
    8 Posts
    1k Views
    rdipardoR

    New Problem: The plugin “NppXmlTreeview 2” crashes always at startup. Error message: “NppXmlTreeviewPlugin.dll just crashed in runPluginCommand (size_t i:58)”

    Actually an “old” problem

    Indeed, even older than I thought.

    The problem seems to only affect version 2 (“Rome”). 1.5.0.54 (“Berlin”) apparently works fine.

  • Code Folding Plain Text in Dark Mode

    2
    1 Votes
    2 Posts
    408 Views
    PeterJonesP

    @Frank-Wojtczak ,

    UDLs are mostly independent of themes – you define their colors separately from the theme colors. By using “transparent” background instead of fixed background (right click on the color square, or click the “Transparent” checkbox if you’re in a new enough version of Notepad++), you can alleviate some of the problems of it not matching well with the rest of your theme, because it will just inherit the background from your theme. But a foreground color that works well on a light background will not usually work well on a dark background. This is the reason that even the Markdown UDL that distributes with Notepad++ has two versions – one if you’re in Dark mode, and one for default light mode.

    how can you edit a User Defined Language

    Language > User Defined Language > Define My Language, then select your UDL from the User Language dropdown. Then edit the keywords,operators,styles, etc just as you did when you created.

    how can you delete a User Defined Language

    Language > User Defined Language > Define My Language, then select your UDL from the User Language dropdown. Then Remove

    See also: https://npp-user-manual.org/docs/user-defined-language-system/