• 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
    8k 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
    413 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
    2k 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.

  • Alt key interferes with work

    11
    0 Votes
    11 Posts
    1k Views
    Lee HoganL

    @Lee-Hogan I also having the same problem regarding the typing in a computer. So, we can say that its a common problem facing by the people globally.

  • UDL - parser for journal file "' 0:<" delimeters

    4
    0 Votes
    4 Posts
    415 Views
    naumanmyN

    Hi Ron
    Were you able to fix the issues and use the UDL?
    Can you please share the current copy of the Journal file highlighting?
    Thanks

  • How do I recongnize slightly different coding characters?

    8
    0 Votes
    8 Posts
    2k Views
    M

    @guy038 it looks good, however I don’t have an ANSI file so I can’t practice it

  • To add the button "Save as..." in the toolbar

    3
    0 Votes
    3 Posts
    2k Views
    Jacques PrestreauJ

    @PeterJones
    Hello Peter,

    Thanks a lot for your help.

    Great ! Your procedure works !

    I had troubles to reproduce it. I didn’t understand why it didn’t work the first times until I thought “Gosh ! The semicolons at the beginning of the lines are probably there to transform these lines to comments !”

    Then I removed the semicolon which was the first character on the newly created line, and… Ha ha ! Won ! The button appeared ! And with its tooltip. And it works.

    :)

    Now it will be a piece of cake to modify the icon and put a small bitmap in its place using the last step of your explanation.

    Thanks a lot again, Peter !

    Cheers !
    Jacques (from France)

  • How to enable syntax error

    3
    0 Votes
    3 Posts
    3k Views
    Metro CityM

    @Ekopalypse Great ^^

  • Ctrl+down to jump to the beginning of the next paragraph

    3
    0 Votes
    3 Posts
    554 Views
    Alan KilbornA

    This can be seen/changed in the “Shortcut Mapper”, the area of the Notepad++ software that allows customization of keycombos. Invoke it:

    e70ecd40-0823-4b2c-9f47-9813225047dd-image.png

    And change to the “Scintilla commands” tab and do some downscrolling:

    6c679e17-4457-4a11-b6f7-28b8480625b7-image.png

    So, as a user you probably don’t care about “Scintilla” or even know what it is – it is an editing component that Notepad++ embeds to get its real work (editing text!) accomplished.

    Thus, you’d have to have some intuition about what “SCI_PARADOWN” means, but for the most part this isn’t too difficult.

    BTW, you could remap this command to Ctrl+down if you wanted, but that keycombo is tied by default to a different command, so you’d have to remap the other command as well so as to not have a conflict.

  • Export Hex view in Txt format

    3
    0 Votes
    3 Posts
    3k Views
    Cyril Di ValentinC

    Tanks a lot for your answer. I will try to use xxd as you mentonned.
    I can also use hexedit but the size of the file (dump file .bin) is too big for hexedit so that i don"t have the whole file…
    Therefore if you already used a similar application, I would be very interested in that.

    Thanks and have a good week.

    Cyril

  • Changing the default save as type to all types (*.*)

    4
    0 Votes
    4 Posts
    310 Views
    MaximillianMM

    @Alan-Kilborn Thanks so much!
    Cheers

  • Clear read only flag

    2
    1 Votes
    2 Posts
    204 Views
  • Add a character to the beginning of each bookmarked line

    2
    0 Votes
    2 Posts
    510 Views
    guy038G

    Hello, @zean-yauh and All,

    Do you mean something like that ?

    SEARCH (?-s)\R(?!.+:)

    REPLACE \x20

    Tick the Wrap around option

    Select the Regular expression search mode

    Click on the Replace All button

    Best Regards,

    guy038

  • the np++ is displaying gibberish, not words

    3
    0 Votes
    3 Posts
    2k Views
    Alan KilbornA

    @Christopher-Johns-0

    The two bytes that start the file on line 1, PK are a dead giveaway that this is a zipped archive file, as Peter indicated. Long ago, zip files were created with a program called pkzip.exe and their contents extracted with a program called pkunzip.exe. I think P was for the name of someone named “Phil”. I’ll really press my memory and say the K was for “Katz”. (I could cheat and google it, but it is often more fun to just try to pull stuff from memory – googling it is left as an exercise for interested readers)

  • Theme settings for better dark mode

    7
    0 Votes
    7 Posts
    6k Views
    deleeleeD

    @PeterJones

    I have found an issue logged with the Snippets project on GitHUb where other users are having the same problem so hopefully it will be resolved soon.

    https://github.com/ffes/nppsnippets/issues/45

  • A few questions about integration with Windows.

    8
    0 Votes
    8 Posts
    721 Views
    omegaglmO

    @PeterJones

    Alright, thank you for all your help.

    Have a great day!

  • Search for a string which ends with a Right parenthesis

    2
    0 Votes
    2 Posts
    186 Views
    EkopalypseE

    @Özgür-Ulusoy

    Using a regular expression search like this
    ^Installing.+\)$ should do the job.

    If you want to understand what this means, please read here.

  • rename not working

    4
    0 Votes
    4 Posts
    297 Views
    Evan Mark yang hebat dari 2020 MinecraftE

    @PeterJones i will try, thank you