• Cannot see network drives anymore

    5
    0 Votes
    5 Posts
    343 Views
    Alan KilbornA

    @Nancy-Tietz

    I, like Terry, have some advice about multiple instances, but mine is much more concise: Don’t do it, the potential problems (most of which are outlined by Terry) outweigh whatever possible advantage you think you are achieving.

  • User Defined Language: highlight up until colon

    5
    0 Votes
    5 Posts
    952 Views
    sseeringS

    @PeterJones

    Thank you. I’ll try this solution as well.

  • Quickie Question -- Which do I install?

    5
    0 Votes
    5 Posts
    992 Views
    Alan KilbornA

    @Alpha-LeFactor said in Quickie Question -- Which do I install?:

    Installing software makes me nervous, these days.

    I feel your feeling.
    But with Notepad++, you’re good.
    But maybe I don’t totally believe this because I’ve never installed it – I’ve only used the portable version.
    Perhaps you didn’t know this exists?
    Nobody has ever convinced me there are benefits to the installed version.

  • Can't save on webdav

    2
    0 Votes
    2 Posts
    414 Views
  • Need to Change multiple rows to Columns

    14
    0 Votes
    14 Posts
    3k Views
    A

    @Terry-R Thank you so much for your help.

  • 0 Votes
    4 Posts
    9k Views
    Terry RT

    @Emalino-Emalero said in How to delete a stipulated number of letters at the beginning of each line?:

    Wouldn’t it be possible to implement this function in text mode in the program?

    Possible yes, probable, unlikely. Since this uses a rudimentary expression that easily covers the process.

    There is another idea that works without regular expressions, it involves the use of a box that covers all 5 characters of all the lines. So you use Ctrl+Alt+mouse button which allows creating a box around the first 5 characters (or any number). Then you’d delete.
    fb8ef8c0-5aba-446b-90b4-83b47e3f7ad8-image.png

    Terry

  • Differing character counts

    3
    0 Votes
    3 Posts
    800 Views
    Alan KilbornA

    Or, it could be a problem similar to this one, in regards to two things that seemingly look identical, are really not:

    https://github.com/notepad-plus-plus/notepad-plus-plus/issues/11999

  • Yet another TextFx feature help request - CSV Column Line Up

    2
    0 Votes
    2 Posts
    599 Views
    PeterJonesP

    @Nando-Piscopo ,

    When you know it’s “yet another TextFx” question, have you considered looking to see if it’s a FAQ? Because it is. And as the “LineUp” entry in that FAQ suggests, Elastic Tabstops plugin might help you line up columns (though it’s been a while since I’ve used it, and I don’t remember if it has that specific column-feature or not).

    That said, the FAQ also links you to the NppTextFX2 plugin, where someone took the original TextFX code and made it compatible with Notepad++ v8.4-and-newer (though there might still be one or two features which aren’t working … if you find missing/broken features, file a bug report with the NppTextFX2 repository)

    FYI: the plugins CSV Lint (which allows each column to be colored differently, to help visualize columns even without the LineUp feature) and CsvQuery (which makes it easy to search big CSV, if you know SQL syntax) are generally considered useful when working with CSV files as well.

  • Joining every 100000 lines into 1 line

    4
    0 Votes
    4 Posts
    418 Views
    M PM

    @Terry-R @guy038 Thank you so much! You guys saved me a lot of time. It works perfectly accurate

  • Notepad++ VERY slow to open

    15
    0 Votes
    15 Posts
    8k Views
    EkopalypseE

    @Jeff-Esposito said in Notepad++ VERY slow to open:

    What is it and why is it doing this?

    Glad to hear you figured it out, and sorry for the late reply, but I try to stay away from the computer on weekends.

    Windows provides the ability to collect statistics about running processes, and that is what procmon uses. I don’t think profiling information is particularly useful in most cases. The only scenario I can think of is if you are developing a driver that is loaded by the kernel, then you can get the information if it is working fast enough or leaking memory by comparing the collected values.

  • 0 Votes
    3 Posts
    265 Views
    Doug RobinsonD

    @Terry-R OK, so RTFM. lol Fair enough. Thanks!

  • dark mode & Compare plugin

    7
    0 Votes
    7 Posts
    9k Views
    Sserddae KaflaerS

    I forgot to mention some things in my earlier post:

    The scripted switch between light and dark mode doesn’t work while Notepad++ is open. You have to close it, run the script and open it again (should be no problem if Notepad++ remembers the current session for the next launch and regular backups are made).

    For Linux-users: setting custom colors in the Compare plugin settings windows doesn’t work (at least on my Mint box, probably because of a link to a missing Windows system color picker). You have to modify the color codes manually in the config files. If you stick to dark mode all the time, you can just set the custom colors once in ComparePlugin.ini and omit the custom light and dark config files and the switching scripts.

    @Phantom-Lord: coincidentally, I called my script to switch to light mode “Hit the lights” (Metallica in-joke).

  • Replace the comma between two selected words using regex replacement

    4
    0 Votes
    4 Posts
    458 Views
    Alan KilbornA

    @voska7 said in Replace the comma between two selected words using regex replacement:

    i want to replace comma only inside [ABC] [/ABC]

    If you go to the FAQ on this site…
    And from there go HERE
    One of the choices there will take you HERE…which seems to be what you need.

  • Remove unicode characters within range

    3
    0 Votes
    3 Posts
    1k Views
    Dan WierD

    @PeterJones Thank you so much for not only the answer but explaining the difference notation. I may need to adjust my range but it felt like a good place to start to see what I get back from these documents.

  • How to highlight numbers WITHIN words

    3
    0 Votes
    3 Posts
    1k Views
    PeterJonesP

    @Sean-Voltaire said in How to highlight numbers WITHIN words:

    I have already tried toggling the setting “Match whole words only”

    Preferences>Highlighting>Smart Highlighting only affects what is shown when you manually select a piece of text: if you select 314159 here, then it will look like:

    Any Whole Words Only 0110005c-2c89-4945-afbf-cba3a4e8c751-image.png 5a9ee64c-1b2a-4aa4-aad4-322950bf95aa-image.png

    But that will only show you exactly the digits that are currently selected – so it finds the digits of pi, but not the digits of e, since the digits of pi are the ones I had selected.

    That option does not affect UDLs.

    I wasn’t sure if that was tried as a way to change the behavior of the UDL, or if that “match whole word only” was meant to affect something else other than manually selecting text and having it highlight all other text that matches the selection.

    If you couldn’t think of other ways to manually select/mark digits: use the Search > Mark (Ctrl+M) and use a regular expression to manually mark all strings of digits.

    04917b6d-291b-4a74-9aa7-7dd2f9395ae8-image.png

    But given your focus on UDL in the rest of your question, I wonder if you are really just trying to change UDL behavior. You cannot do that with any of the options in the Preferences dialog; UDL is controlled via the UDL dialog/panel and that’s it.

    As far as UDL syntax goes: no, there is no ((SPACE)). ((EOL)) is the only fancy escape… well, except for enclosing a term in quotes: "key word" will match key word but not key other word

    cf28a316-8c9f-4b96-9138-77011b395f0d-image.png

    The quote-around-spaces works for keywords and folding-in-code-2, but in my experiments today, I couldn’t get it to work in folding-in-code-1 or comment-line or operators or delimiters. So that might work for your ((SPACE)) desire, in certain circumstances.

    If you’re really looking to highlight extra numbers that are in weird situations and would like to be able to use a regex but otherwise treat it as a UDL, you can use @Ekopalypse’s Enhance Any Lexer. For example, if I have a UDL called “voltaire” which uses an aqua-like color similar to what you have for its “number style”, and in Enhance Any Lexer, set

    [voltaire] 0xFFFF00 = (?<=[\l\u_])\d+|\d+(?=[\l\u_])

    which will set digits to bright cyan if they have upper or lowercase or underscore to the left or right; otherwise, if the UDL thinks of it as a “word” of numbers (spaces or operators to either side), then the UDL will highlight them with the aqua.

    adc84e21-736b-4a56-b90d-d31c8dc9d19d-image.png

  • List of open tabs are not scrollable

    4
    1 Votes
    4 Posts
    829 Views
    Alan KilbornA

    I noticed a similar open issue for this sort of thing, so I added a comment to the issue, see HERE.

  • Syntax for functionList.xml for R statistical programming language

    15
    1 Votes
    15 Posts
    1k Views
    Monte ShafferM

    @PeterJones I have had NOTEPAD++ on this laptop for a LONG, LONG time (6+ years).

    I was doing some maintenance UPGRADES in R and thought ‘I wonder if I can get this syntax thing to work’ in NOTEPAD++, so here we are.

    Here is the actual example of a function that I have failing:

    stats.summary = function(x, tukey=TRUE, type=1, signif.digits=options("digits")$digits, names = c("min", "-Q1-", "median", "Mean", "-Q3-", "max"), ... ) { # do stuff here! }

    Cheers,

  • how to view .dat file

    3
    0 Votes
    3 Posts
    7k Views
    PeterJonesP

    @Haffy-Ree said in how to view .dat file:

    I opened a .dat file that is supposed to have numbers and letters (text only)

    As Alan hinted, you supposed incorrectly. That file obviously has many binary bytes beyond plain text. Usually files that are named .dat are binary files, not text files.

    We actually have a whole FAQ on that

  • Really save modified file when closing Notepad++

    2
    0 Votes
    2 Posts
    383 Views
    Alan KilbornA

    @Michael-Binz said in Really save modified file when closing Notepad++:

    This seems to be a new feature that was added over the last year

    Nope, as far as I know this capability has existed in Notepad++ for decades. But, you are IMO smart for not wanting to use this feature.

    You will get the behavior you seek by unticking this box:

    46a6cec9-95ef-41cb-8579-9f7f3cf8db43-image.png

    To get there, go to “Settings” menu and choose “Preferences”.

  • Pasting copied text in a search window in a macro

    9
    0 Votes
    9 Posts
    765 Views
    PeterJonesP

    @Raúl-ALR ,

    The instructions for installing and running this script are in the FAQ: How to install and run a script in PythonScript

    The script-specific instructions are found in the script’s code itself.

    # encoding=utf-8 """in response to https://community.notepad-plus-plus.org/topic/23339/pasting-copied-text-in-a-search-window-in-a-macro This searches in the "objects" file for every line: <ObjectRef ref="..."/> It grabs the ref ID, and searches for that ID in the "hosts" file <Host id="id4843X9273" name="object_name" comment="" ro="False"> It grabs the name field from the matching line in the "hosts" file It then replaces the whole <ObjectRef.../> with that name field In the lines below, change the paths to the two files: - The first path is the "objects" file, - The second is the "hosts" file. - Both must be opened in Notepad++, but it doesn't matter which view they are in. - Full paths are required. It makes it a single undo action, so if you don't like the results, you can just hit UNDO """ from Npp import editor,notepad,console class Class23339(object): def go(self, object_fname, host_fname): self.object_fname = object_fname self.host_fname = host_fname notepad.activateFile(object_fname) editor.rereplace(r'<ObjectRef ref="([^"]*)"/>', lambda m: self.repl_in_objects(m)) def repl_in_objects(self, m): notepad.activateFile(self.host_fname) editor.research(r'<Host id="{}" name="(.*?)"'.format(m.group(1)), lambda ms: self.find_in_hosts(ms)) notepad.activateFile(self.object_fname) return self.found_in_hosts def find_in_hosts(self, m): self.found_in_hosts = m.group(1) editor.beginUndoAction() Class23339().go( r"c:\users\peter.jones\downloads\tempdata\nppCommunity\objects.xml", r"c:\users\peter.jones\downloads\tempdata\nppCommunity\hosts.xml" ) editor.endUndoAction()

    If you want to ever customize these, the editor.rereplace(...) line starts with the regex that will match lines in the “objects” file and put the ref-ID value in group(1); the editor.research(...) line starts with the regex that will find the specific ref-ID in the “hosts” file, and grab the value of the host name out of there.