• XML Tools Pretty Print fails to indent close tag

    6
    0 Votes
    6 Posts
    485 Views
    Snabel42S

    @theshoeshiner did you guys compare the options for XML Tools?
    There’s quite a number of settings there that would affect the result.

  • Kotlin Language

    2
    0 Votes
    2 Posts
    2k Views
    Mark OlsonM

    @Adil-Sattar
    Since most Kotlin developers have probably long since moved to more fully-featured IDEs (can’t speak to what those are; not a Kotlin dev myself), you will probably be waiting a long time to get something made by someone else.

    If you’re really determined to use Notepad++ to write Kotlin, your options would seem to be:
    1a. Use the User defined language system, supplemented with EnhanceAnyLexer as needed/desired.
    OR 1b. If you’re really hardcore, write a new lexer in C++ and submit it to the fine people at Lexilla
    2. Maybe use NppLspClient with some Kotlin LSP server to get autocompletions and syntax analysis and whatnot?

  • please update (Target) to copy only unique lines.

    2
    0 Votes
    2 Posts
    195 Views
    Lycan ThropeL

    @istec ,
    You need to go to the plugin authors github site or website and make this specific request. This forum is a group of like users that help each other, we are not developers that can make changes you throw out in a request. Please check your plugin’s Help/About information to reach the author.

  • NppExec v0.8.5 has been released!

    1
    6 Votes
    1 Posts
    225 Views
    No one has replied
  • CS-SCRIPT problem after rebuilding machine.

    2
    0 Votes
    2 Posts
    228 Views
    Mark OlsonM

    @Pat-Sinclair-0
    Go to repo with plugin issue if you haven’t already.

    if I had a penny for every time I said something like this to somebody posting about a plugin issue on the community forum… (don’t worry OP, I’m not mad at you, just amused at how often I say something to this effect)

  • Plugin request: GhostText support

    4
    1 Votes
    4 Posts
    355 Views
    rdipardoR

    A PythonScript plugin would be the best approach. I suggest starting with the NeoVim plugin, which is just a Python module. Most of the APIs provided by pynvim.api.nvim should have Scintilla equivalents in PythonScript’s API modules. If not, you could make a contribution to PythonScript by patching them in. (Neo)Vim is years ahead of N++ in terms of a fully integrated Python subsystem.

  • Explorer plugin shows only default icon for TXT files

    1
    0 Votes
    1 Posts
    199 Views
    No one has replied
  • Context menu via code

    4
    0 Votes
    4 Posts
    320 Views
    Alan KilbornA

    @General-Coder said in Context menu via code:

    So is the only way SendMessage?

    If by that you mean using Windows API calls which deal with menus, then the answer is yes.

  • Plugin Docking Panel floating / docked detection

    13
    1 Votes
    13 Posts
    608 Views
    Michael VincentM

    @rdipardo said in Plugin Docking Panel floating / docked detection:

    DMN_FLOAT and DMN_DOCK are passed as the code member of a NMHDR struct, which you intercept by hooking the WM_NOTIFY message.

    Indeed. This all makes sense now. I’m overriding the default run_dlgProc() in “DockingDlgInterface.h”. So what I need to do in my run_dlgProc() is if I don’t process the WM_NOTIFY, call the default one:

    DockingDlgInterface::run_dlgProc( message, wParam, lParam );

    Works now! Thank you all - have a great weekend!

    Cheers.

  • 0 Votes
    3 Posts
    232 Views
    PeterJonesP

    @flacy1 ,

    Your request is hard to understand.

    Some time back, the author tried turning on automatic backups by default, and he immediately got a huge backlash from angry users, so he went back to the current settings as default.

    As with any piece of editing software, the best idea is for you to investigate all the backup options available, and to set them to what works for your backup needs. See our FAQ: https://community.notepad-plus-plus.org/topic/21782/faq-desk-periodic-backup-vs-autosave-plugin

  • Convert Spaces to Newlines

    3
    0 Votes
    3 Posts
    1k Views
    Shaer Alvy AumiS

    @wonkawilly Thanks a Lot! :)

  • Rewrap/Unwrap with NppTextFX2

    7
    0 Votes
    7 Posts
    1k Views
    wonkawillyW

    @PeterJones

    It seems that TextFX Edit sub-menu is not the only one absent

    Comparison screenshots follows:

    mine ▼ yours ▼

    4a1f3e3f-ea7a-43f1-b94c-3fbda4f1f441-image.png

    there are 3 absent sub menu

  • NPP WYSIWYG for HTML toolbar

    6
    0 Votes
    6 Posts
    1k Views
    Lycan ThropeL

    @Admin-TKRUO ,
    Security of one’s own browser and OS is subject to each users versions. Some people still are using Windows 7, and following a link off forum, is a security risk, once someone leaves this forum. So, the threat level is not for you to dismiss for others, but to follow the forum practice of not leaving links that lead to places other than this forum especially when you could have just as well pasted a graphic into these forums if you took the time to learn how to properly do it.

  • Notepad WYSING

    18
    0 Votes
    18 Posts
    1k Views
    Lycan ThropeL

    @Admin-TKRUO ,
    Wow, this is totally unintelligible. You need to use a better translator, I think.

  • Documentation History

    4
    0 Votes
    4 Posts
    354 Views
    Mark OlsonM

    I felt like my previous script was suboptimal as a keylogger because:

    it could only be parsed by regular expressions it generated a pretty verbose log with every keystroke, which seemed like an easy way to rapidly create a multi-megabyte log file.

    I’ve updated the keylogger so that:

    the log file is a JSON Lines document, which is very easy to parse (just split it into lines and use your favorite JSON parser to parse each line) the date is only logged when the date changes or when the logger first starts up The current filename is only logged when the file is saved or opened. key logs have the format {"+": <text added>, "t": hours:minutes:seconds, "pos": position}, with "-": <text removed> for text removal operations.

    While the user must later re-associate filenames and dates with each modification log, this is a very simple task.

    Below is an example log:

    {"date":"2023-06-07"} {"fileOpened":"Path\\To\\AppData\\Roaming\\Notepad++\\plugins\\config\\PythonScript\\scripts\\keylogger.py","t":"14:38:16"} {"fileOpened":"Path\\To\\Python311\\example_silly.txt","t":"14:38:16"} {"+":"a","pos":0,"t":"14:38:18"} {"+":"s","pos":1,"t":"14:38:18"} {"+":"d","pos":2,"t":"14:38:18"} {"+":"f","pos":3,"t":"14:38:18"} {"+":"\r\n","pos":4,"t":"14:38:19"} {"-":"asdf\r\n","pos":0,"t":"14:38:20"} {"fileSaved":"Path\\To\\Python311\\example_silly.txt","t":"14:38:21"}

    And here’s the new script:

    from Npp import * from datetime import datetime import json from pathlib import Path # create a subdirectory of the PythonScript scripts directory called mod_logger LOGDIR = Path(__file__).parent / 'mod_logger' LOGFILE = LOGDIR / 'mod.jsonl' # create a JSON Lines document in that directory def compact_json_dump(obj): return json.dumps(obj, separators=(',', ':')) def date_to_int(date): return (date.year << 16) | (date.month << 8) | date.day class ModLogger: def __init__(self): self.FNAME = notepad.getCurrentFilename() self.date_int = 0 self.log_date_change() def log(self, obj): with LOGFILE.open('a') as f: f.write(compact_json_dump(obj)) f.write('\n') def log_date_change(self): now = datetime.now() dint = date_to_int(now) if dint > self.date_int: self.date_int = dint self.log({'date': '%d-%02d-%02d' % (now.year, now.month, now.day)}) return now def on_bufferactivate(self, notif): self.FNAME = notepad.getCurrentFilename() now = self.log_date_change() self.log({'fileOpened': self.FNAME, 't': '%02d:%02d:%02d' % (now.hour, now.minute, now.second)}) def on_filesaved(self, notif): now = self.log_date_change() self.log({'fileSaved': self.FNAME, 't': '%02d:%02d:%02d' % (now.hour, now.minute, now.second)}) def on_modification(self, notif): # see https://www.scintilla.org/ScintillaDoc.html#SCN_MODIFIED mod_type = notif['modificationType'] keylog = {} if mod_type & 0x01 != 0: keylog['+'] = notif['text'] elif mod_type & 0x02 != 0: keylog['-'] = notif['text'] else: return keylog['pos'] = notif['position'] now = self.log_date_change() keylog['t'] = '%02d:%02d:%02d' % (now.hour, now.minute, now.second) self.log(keylog) if __name__ == '__main__': try: MOLO except NameError: MOLO = ModLogger() if not LOGDIR.exists(): LOGDIR.mkdir() if not LOGFILE.exists(): with LOGFILE.open('w') as f: pass # I *WANT* to use SCINTILLANOTIFICATION.KEY, which would *actually* # log keypresses, # but for some reason that notification never fires, # and SCINTILLANOTIFICATION.MODIFIED is the closest we've got editor.callback(MOLO.on_modification, [SCINTILLANOTIFICATION.MODIFIED]) notepad.callback(MOLO.on_bufferactivate, [NOTIFICATION.BUFFERACTIVATED]) notepad.callback(MOLO.on_filesaved, [NOTIFICATION.FILEBEFORESAVE])
  • How do i compile CustomizeToolbar plugin?

    3
    0 Votes
    3 Posts
    281 Views
    MiMM

    @Ekopalypse Eh, i just created a new dll project but i didn’t know where to put the customize toolbar source files.

    I thought npp plugin template would give me some insight but i had no luck.
    I’ll give up for now.

  • [Plugin Update] NavigateTo

    22
    0 Votes
    22 Posts
    12k Views
    Mark OlsonM

    @guy038

    Good suggestions! I’ve been enjoying working on this plugin, and I don’t know what Oleksii has in mind, but I’m planning to start working on adding glob syntax to NavigateTo, along with | for logical OR and <expression> for grouping.

    Ideally I’d like to be able to do something like this:
    *foo*.txt | <bar baz.md>
    which would match (.txt files with foo in the filename (but not elsewhere in the path) OR (files named baz.md with bar somewhere else in the path)

    I can also port in the dark mode support that was recently added to the NotepadPlusPlusPluginPack, @sualk.

  • NppExec v0.8.4 has been released!

    1
    3 Votes
    1 Posts
    218 Views
    No one has replied
  • How to setTextColor in DockingDlgInterface Window

    3
    1 Votes
    3 Posts
    238 Views
    Thomas KnoefelT

    Alain, You’re correct, I started testing exclusively in Dark Mode and haven’t gotten to Light Mode yet. Your screenshot is exactly what I was trying to achieve… I have avoided diving into NPP’s code until now, as it might be too time-consuming.

    Thanks for the useful links and info. I’m eager to test them out and see how they help. However, you have a point - maybe it’s best to ignore color issues for now since Dark Mode doesn’t fully support them yet. And colors are not part of the key functionality.

    Also, while implementing, I noticed a couple of bugs related to themes. One is a refreshing problem with comboboxes (not selected lines are pitch black) only in Light Mode (but surprisingly not happening in all Windows installations), and the other is about the color scheme of a disabled list in Dark Mode. I’ll report these on Github.

  • Project plugin functionality

    22
    0 Votes
    22 Posts
    2k Views
    Alan KilbornA

    @General-Coder said in Project plugin functionality:

    but they are pain to read

    Nobody here wants to spoon-feed you. Sorry.