• HTML colors in proper colors

    13
    0 Votes
    13 Posts
    6k Views
    PeterJonesP

    @Alan-Kilborn said in HTML colors in proper colors:

    Did the earlier code run too slowly?
    I ask because it seemed to process only what was on-screen to a user as opposed to the whole-file.
    … maybe you encountered some other difficulty relating to it.

    With my 90-color example, where I had multiple instances of those same 90 color blocks, as I would scroll up and down the file, it would slow down my scrolling as it kept redrawing the screen for every line of movement (ie, every time the UPDATEUI notification was triggered). That was annoying to me. My whole-file-once approach took 2-5sec to do the whole file, but then I could scroll to my heart’s content; the notification-based one-screen solution took <1s per screen, but it cost that same amount of time every scroll action; scrolling more than a few lines or a few times would quickly move the higher efficiency from one-page to color-once-then-move-freely.

    If I were editing a large HTML file (I don’t do that – I am just doing this because it is interesting and I had an idea I wanted to try), I think I would prefer colorizing the whole thing, on demand. If I were trying to decide which color to put in the HTML/CSS, the NppQCP would be a better option, because you could start with what you have, then tweak the value in the plugin. But if I just want a quick visual reference of what color each of those are as I’m editing other things in my HTML/CSS, I wouldn’t need to refresh it often, and doing the whole document one time would mean I could scroll throughout the document without further delays.

    To each his own, I guess. If someone wanted an on-demand-but-just-the-visible-screen, the start_position and end_position values could go back to the visible-line-start/ends that were in my first gist.

    Since I was implementing this more for my own learning than to help the OP, I decided to implement it in the way that would most likely match the way I might use the feature in the future. And both gists are still there, so either are available for direct use or for taking and editing to match one’s own use-case.

    I said,

    It may already be changed in the gist by the time you get here.

    It’s changed now, BTW.

  • Copy and paste within a Macro

    18
    0 Votes
    18 Posts
    2k Views
    gstaviG

    My macro:
    stand on beginning of Leicester
    start recording
    shift-end
    ctrl-c
    end
    space
    delete
    end
    space
    delete
    home
    down arrow
    ctrl-v
    end
    enter
    up arrow
    stop recording

    replay recording
    replay recording
    replay recording
    replay recording
    replay recording

    end up with extra Leicester to delete.

    A simpler approach would be to just merge every 2 lines and then add the common prefix with column editing.

  • 0 Votes
    2 Posts
    561 Views
    PeterJonesP

    @Darius-Runge ,

    I am glad that Notepad++ works for your dot matrix. I don’t think the developers do anything special to support that.

    I don’t know a lot of the behind-the-scenes in modern printing, but Notepad++ presumably shoots text data and font information (font name, size, weight, and color) at the driver, and the Windows printer driver for your printer presumably translates that into the right data for your individual printer.

    My guess is that characters-per-line (ie, page width) is a setting of your printer driver. Actually, it’s probably physical page width, rather than characters-per-line. For example, using the Microsoft Print to PDF driver that I get with MSOffice at work, I printed the same document twice from Notepad++: the first time, I did it in normal portrait orientation, and got about 82 characters of actual text (plus my line numbers in the left margin); I then did a second print in landscape (wide) orientation and got at least 20 more characters per line. So I think the printer driver tells Notepad++ “I have this much width”, and when Notepad++ then sends the data to the printer driver, Notepad++ uses that much width before wrapping the data.

    So, when you use File > Print from Notepad++, instead of immediately hitting Print from the dialog, try the Preferences, and see if you can define a page size that more accurately matches your actual paper size (or the effective paper size that Notepad++ should see to make use of the full width of your printer) – you might have to go into Advanced after choosing Preferences.

  • Defining own language - operators/comment style issue using the '§' sign

    2
    0 Votes
    2 Posts
    266 Views
    PeterJonesP

    @sesa150162 ,

    Unfortunately, the § is at codepoint U+00A7, which is outside the range that UDL officially supports (it is only guaranteed to work with U+0020 to U+007F). There have been at least two issues (#6014 and #8562) requesting Unicode support in UDL, but UDL doesn’t get much attention, so they remain open.

    As a workaround, you can add extra highlighting to a builtin lexer or to your User Defined Language (UDL) using regexes via the script EnhanceAnyLexer.py that @Ekopalypse shares in his github repo. Since the matching is done on the Python side, it has full Python 2.7 support for Unicode strings, so you should be able to define your regex inside that script like u'§\w+§' or maybe r'§\w+§'

  • 0 Votes
    2 Posts
    243 Views
    PeterJonesP

    @Ryan-Massey ,

    Sorry for the long delay in reply.

    \appdata\roaming\notepad++\plugins\NppFTP.xml

    Was that a typo for

    ...\appdata\roaming\notepad++\plugins\config\NppFTP\NppFTP.xml

    or did you really expect the NppFTP.xml file to be at the top level of the plugins folder?

    But that said, I doubt that’s your real problem. I don’t know anything in the installer/upgrade process for the Notepad++ app itself that would wipe out your previous plugins config – I’ve never seen that happen.

    Unfortunately, if it has happened, there’s not much we can do to recover it. Recuva or other file-recovery software might help, but we’re not experts on such software here. (But if you only had a few, it’s probably easier just to rebuild the list inside NppFTP.)

  • files corrupted in recent update

    2
    0 Votes
    2 Posts
    156 Views
    PeterJonesP

    @Jennifer-Rumford ,

    Are these files that you saved frequently, or did you leave them in an unsaved state, and just trusted that Notepad++ (and Windows) would keep them from disappearing over the long run?

    The best way to avoid losing your data is to save frequently and to have your drive backed up regularly.

    To recover lost data:

    If you have Settings > Preferences > Backup > ☑ Enable session snapshot and periodic backup when the checkbox marked on, then the folder it shows* will hold the most recently saved versions of unsaved files. (*: most likely c:\users\username\AppData\Roaming\Notepad++\backup, or whatever %AppData%\Notepad++\backup 🛈 resolves to on your setup) If even those copies don’t have the missing data, then you might need to run Recuva or other file-recovery software, both on the “real” location of your file and on the backup folder mentioned above, to see if you can recover previous versions.
  • Tabs printing

    3
    0 Votes
    3 Posts
    311 Views
    PeterJonesP

    @Marty-Kay ,

    Do you mean you want the wide spacing caused by a tab 998c9948-6520-4e33-82bb-5127b934b70c-image.png to be collapsed to something narrower when printing? There’s no real way to do that, as far as I know.

    Or do you mean that you have View > Show Symbol > View White Space and TAB enabled, and when you print, you see the → placeholder f3a01f4f-4dbf-4e44-969e-2a6089bc2adb-image.png To disable that, the easiest way is to turn off View White Space and TAB before printing.

  • How to Delete Searches Instantly?

    2
    0 Votes
    2 Posts
    219 Views
    guy038G

    Hello, @meтe-ялчынкая and All,

    Very easy with regular expressions or bookmarks !

    A) With bookmarks :

    Open the Mark dialog ( Ctrl + M )

    SEARCH #

    Untick all the options

    Tick the Bookmark line option

    Tick the Wrap around option

    Click on the Mark All button

    Then, run the menu option Search > Bookmark > Remove Bookmarked Lines

    B) With regular expressions ( faster ! )

    Open the Replace dialog ( Ctrl + H )

    SEARCH (?-s)^.*#.*\R

    REPLACE Leave EMPTY

    Untick all the options

    Tick the Wrap around option

    Click on the Replace All button

    The search regex searches, from beginning of line ( ^ ) for any range of standard characters, even none ( .* ), followed with a # char, and again, with any range of standard characters, even none( .* ), till the EOL characters of current line ( \R )

    Best regards

    guy038

  • Closing files before opening the new one

    5
    0 Votes
    5 Posts
    1k Views
    PeterJonesP

    @Cyrille-Piatecki-0 said in Closing files before opening the new one:

    @PeterJones I have tried to follow your advice. But, in my last installation of notepad++, no “C:\Users\cyril\AppData\notepad++”
    has been created.

    %AppData% has a precise meaning, and the path you showed indicates that you need to read the FAQ on the subject

    The other possibility is that you have a portable version rather than an installed version, in which case, shortcuts.xml would go in the portable folder. I doubt that’s your setup, but if you’re unsure, post your ?-menu’sDebug Info.

    But I still think my original instructions apply, and that you just misinterpreted the windows variable

  • 0 Votes
    4 Posts
    34k Views
    deniz mısırlıD

    @PeterJones Thank you so much. You are right, I was that used to create notes with notepad++, I couldn’t realize that it has become my default note. I’m sorry for the inconvenience and thank you for your reply. Everything is fine.

  • To close may html windows before opening a new

    2
    0 Votes
    2 Posts
    149 Views
    PeterJonesP

    @Cyrille-Piatecki-0 ,

    You already asked that , and I already answered.

    https://community.notepad-plus-plus.org/topic/21043/closing-files-before-opening-the-new-one

    Reply to that thread if the answer wasn’t sufficient

  • Issue with Polish letters

    27
    0 Votes
    27 Posts
    5k Views
    ArkadiuszMichalskiA

    For polish he should use ISO 8859-2 (Eastern European), but nowadays I would rather recommend UTF-8.
    @nightznero To twoja twórczość?

  • Regex for end-of-file anchor

    11
    2 Votes
    11 Posts
    4k Views
    M Andre Z EckenrodeM

    @PeterJones and everyone else —

    Looks good, thanks!

  • On selection in the edit menu

    5
    0 Votes
    5 Posts
    411 Views
    Laurie StearnL

    Thanks for the heads up on the Edit Popup ContextMenu!
    My issue was the reverse of the OP’s in that the “Search on Internet” item was in the “On Selection” but not in the popup menu. The cause being the missing menu item in an older config file not over-written due to an other (resolved) issue.

  • How to Find a Line Number in Notepad++ (Search and Find shortcut)

    4
    0 Votes
    4 Posts
    21k Views
    Alan KilbornA

    @Ekopalypse said in How to Find a Line Number in Notepad++ (Search and Find shortcut):

    Do you mean the standard goto line dialog?
    Search->Go to

    @Vasile-Caraus said:

    Can I use a shortcut?

    Additional notes:

    pressing Ctrl+g will invoke it (there’s your shortcut!) double-clicking this area (the part highlighted in yellow) of the status bar will invoke it:

    6d3e4d75-4581-4d2e-ac18-4b51945652e5-image.png

  • Completion of HTML tags

    9
    0 Votes
    9 Posts
    394 Views
    Cyrille PiateckiC

    @PeterJones I take a long time to thank you for your help because I have a lot of problem with Jsxgraph … Nevertheless I have followed your advices and it seems to work correctly.

  • Notepad++ keeps messing up the colors of my user defined language

    2
    0 Votes
    2 Posts
    691 Views
  • Find character ranges across multiple lines

    8
    1 Votes
    8 Posts
    331 Views
    Kandice FelicianoK

    Thank you both. Thanks to the above 2 syntax I can rely on it to find any email address with a domain that I need. Since I very often use it to find emails on drive D or E. Previously this work took me quite a lot of time and trouble. Once again thank you 2

  • Find/Replace Help

    3
    0 Votes
    3 Posts
    252 Views
    Mark GrayM

    @PeterJones Thank you SOOO much!

  • "Recent" list in Win10 context menu does not show file without extension

    3
    0 Votes
    3 Posts
    904 Views
    Petra HandwergP

    Thank you @PeterJones for your quick reply and for confirming that it’s a Windows “feature”!
    I thought that I missed to change something in my Notepad++ configuration, that’s why I asked.

    As this is my “work” laptop (and the JumpList is working fine for np++ for “normal” files) I don’t want to install too many tools - only those I can justify that I need them for my work. ;)
    E.g. the plugins for xml and json - they are great!

    Thanks again!