• ALTGR disable

    3
    0 Votes
    3 Posts
    367 Views
    Richard CardosoR

    @rdipardo
    it’s the real keyboard key that doesn’t work, but works perfectly on any other software.

  • UDL comment line style : long dash ( – ) symbol

    3
    0 Votes
    3 Posts
    447 Views
    Mustang MustangM

    Thanks for the hint, I think the EnhanceAnyLexer plugin is what I need and it will help. It would be better to improve UDL and include any UTF character or even emoji there, and even better its own regex rules.

  • Npp++ sometimes makes weird line terminations

    7
    0 Votes
    7 Posts
    431 Views
    PeterJonesP

    @Carmak-Cusac said in Npp++ sometimes makes weird line terminations:

    Though one reason could it be that I, as I said in my OP, used only \n instead of using \r\n when adding new lines with regex

    That is your culprit. To the regex engine, \n means LF character (ASCII 10); that is the definition.

    The Notepad++ developers are not likely to hack at a well-established regex engine to make that engine behave differently than it has for all other instances of Notepad++ and every instance of that regex engine throughout the history of the boost regex engine; sorry. It would seriously break most users expectation. The best suggestion I have for you is to learn that in Notepad++ regex, if you want to use the Windows EOL in replacements, you must use the syntax of \r\n, not just \n.

  • What is lint

    2
    0 Votes
    2 Posts
    1k Views
    PeterJonesP

    @Jeewaka-Karunaratne said in What is lint:

    how to install notepad++

    Go to the official downloads section at https://notepad-plus-plus.org/downloads/, download the installer, run the installer

    what is lint

    Lint” is the fuzzy stuff that comes off clothes in the dryer, and has nothing to do with Notepad++

    A “lint” tool (aka, “linter”)" is a tool that checks the syntax of source code for correctness, bugs, and stylistic errors. If you are typing your code in Notepad++, there are ways to pass that code through an external program like a linter, but there isn’t a linter built into Notepad++.

    I am not sure how the “lint” subject of your post has anything to do with Notepad++, or why you asked that part in conjunction with “how to install notepad++”.

    Further discussion on linters does not belong in this forum, unless it is focused on Notepad++ (and I’m doubtful that it would be).

  • Print formating

    2
    0 Votes
    2 Posts
    207 Views
  • sidebar with lines i need to have reference to

    7
    0 Votes
    7 Posts
    542 Views
    Sylfir The WhiteS

    Thx for the info you provided. I got it at least. It is just a simple “(page |rule ).*?$” regex after all.

  • Right mouse click - Install wizard appears

    2
    0 Votes
    2 Posts
    876 Views
    PeterJonesP

    @SVB-Informatik ,

    When you say “right mouse click on a file”, do you select an option from Windows right-click menu? Or is right-clicking alone (with no selection) enough to trigger this wizard?

    If it happens with any right-click, without choosing a menu option, I am assuming you didn’t actually download the installer from https://notepad-plus-plus.org/downloads/ , and that you got a corrupted / infected copy. Make sure you always download from the official source.

    If you mean you "right click on a file and select Edit With Notepad++, then either you have an unofficial/infected copy, or somehow your Edit With Noteapad++ entry got pointed to the installer instead of to the notepad++.exe executable. You will need to edit your registry to fix the latter.

    If you mean you “right click on the file and select Open With and pick Notepad++ from that”, I will assume that when you did the first Open With, you accidentally tried to Open With the Notepad++ installer instead.

  • Not enough disk space

    2
    0 Votes
    2 Posts
    591 Views
    Alan KilbornA

    @Terese-Studenka-Du-Pont

    I guess the obvious question to ask (from your omission of it) is “how much free disk space do you have on the drive you are attempting to save to?”

    Also, how large is the file buffer you are trying to save? That data is shown in the status bar after length:

  • Plugins Admin disappeared

    2
    0 Votes
    2 Posts
    275 Views
    EkopalypseE

    @Ali-Ryder

    How did you install Npp? Where did you download it from?
    Did you use the version from the store? If yes, then it is not the version developed by DonHo. The official download is here.

  • Colors not shown when open code files

    4
    0 Votes
    4 Posts
    5k Views
    EkopalypseE

    @PeterJones

    Yes, with the newly introduced NPPM_CREATELEXER message we can get rid of the function determining definitions.
    So something like this works now.

    # -*- coding: utf-8 -*- ''' Makes the builtin SAS lexer available for NPP. To toggle the escape characters on/off one can create another script with these two lines of code. sas_lexer.show_escape_chars = not sas_lexer.show_escape_chars editor.styleSetVisible(sas_lexer.SCE_ERR_ESCSEQ, sas_lexer.show_escape_chars) ''' """ Peter trying to adapt https://raw.githubusercontent.com/Ekopalypse/NppPythonScripts/master/npp/error_list_lexer_support2.py based on Eko's comments https://community.notepad-plus-plus.org/topic/23147/missing-lexers-from-lexilla/7 """ from Npp import notepad, editor, NOTIFICATION from ctypes import windll, WINFUNCTYPE, addressof, create_unicode_buffer from ctypes.wintypes import HWND, UINT, WPARAM, LPARAM, HMODULE, LPCWSTR, LPCSTR, LPVOID class SasLexer: def __init__(self): ''' Initialize the class, should be called only once. ''' # **************** configuration area **************** # files with these extensions and a null lexer, # aka normal text, assigned do get handled self.known_extensions = ['sas'] # # **************************************************** self.SCE_SAS_DEFAULT = 0 self.SCE_SAS_COMMENT = 1 self.SCE_SAS_COMMENTLINE = 2 self.SCE_SAS_COMMENTBLOCK = 3 self.SCE_SAS_NUMBER = 4 self.SCE_SAS_OPERATOR = 5 self.SCE_SAS_IDENTIFIER = 6 self.SCE_SAS_STRING = 7 self.SCE_SAS_TYPE = 8 self.SCE_SAS_WORD = 9 self.SCE_SAS_GLOBAL_MACRO = 10 self.SCE_SAS_MACRO = 11 self.SCE_SAS_MACRO_KEYWORD = 12 self.SCE_SAS_BLOCK_KEYWORD = 13 self.SCE_SAS_MACRO_FUNCTION = 14 self.SCE_SAS_STATEMENT = 15 self.NPPM_CREATELEXER = (1024 + 1000 + 110) self.SCI_SETILEXER = 4033 self.user32 = windll.user32 self.notepad_hwnd = self.user32.FindWindowW(u'Notepad++', None) self.editor1_hwnd = self.user32.FindWindowExW(self.notepad_hwnd, None, u"Scintilla", None) self.editor2_hwnd = self.user32.FindWindowExW(self.notepad_hwnd, self.editor1_hwnd, u"Scintilla", None) self.lexer_name = create_unicode_buffer('sas') self.user32.SendMessageW.argtypes = [HWND, UINT, WPARAM, LPARAM] self.user32.SendMessageW.restype = LPARAM notepad.callback(self.on_langchanged, [NOTIFICATION.LANGCHANGED]) notepad.callback(self.on_bufferactivated, [NOTIFICATION.BUFFERACTIVATED]) console.write("Initialized SAS lexer\n") def __del__(self): ''' Destructor (kind of) ''' console.write("Clear SAS lexer callbacks...\n") notepad.clearCallbacks(self.on_langchanged) notepad.clearCallbacks(self.on_bufferactivated) console.write("Destroyed SAS lexer\n") def init_lexer(self): ''' Initializes the lexer and its properties Args: None Returns: None ''' editor.styleSetFore(self.SCE_SAS_DEFAULT , notepad.getEditorDefaultForegroundColor()) editor.styleSetFore(self.SCE_SAS_COMMENT , (0,255,0)) editor.styleSetFore(self.SCE_SAS_COMMENTLINE , (0,255,0)) editor.styleSetFore(self.SCE_SAS_COMMENTBLOCK , (0,255,0)) editor.styleSetFore(self.SCE_SAS_NUMBER , (255,0,0)) editor.styleSetFore(self.SCE_SAS_OPERATOR , (128,64,0)) editor.styleSetFore(self.SCE_SAS_IDENTIFIER , (64,64,64)) editor.styleSetFore(self.SCE_SAS_STRING , (128,128,128)) editor.styleSetFore(self.SCE_SAS_TYPE , (128,0,255)) # not implemented editor.styleSetFore(self.SCE_SAS_WORD , (255,128,0)) # not implemented editor.styleSetFore(self.SCE_SAS_GLOBAL_MACRO , (255,255,0)) # not implemented editor.styleSetFore(self.SCE_SAS_MACRO , (0,0,255)) # start with % editor.styleSetFore(self.SCE_SAS_MACRO_KEYWORD , (0,255,255)) # keywords/keywords1 editor.styleSetFore(self.SCE_SAS_BLOCK_KEYWORD , (0,0,127)) # keywords2 editor.styleSetFore(self.SCE_SAS_MACRO_FUNCTION , (0,127,127)) # keywords3 editor.styleSetFore(self.SCE_SAS_STATEMENT , (0xAA,0,0)) # keywords4 # ordering is important ilexer_ptr = self.user32.SendMessageW(self.notepad_hwnd, self.NPPM_CREATELEXER, 0, addressof(self.lexer_name)) editor_hwnd = self.editor1_hwnd if notepad.getCurrentView() == 0 else self.editor2_hwnd self.user32.SendMessageW(editor_hwnd, self.SCI_SETILEXER, 0, ilexer_ptr) editor.setKeyWords(0, "%let %do") editor.setKeyWords(1, "also cards class data input model ods proc var where") editor.setKeyWords(2, "%printz") editor.setKeyWords(3, "run") console.write("SAS lexer: set styles\n") def check_lexers(self): ''' Checks if the current document is of interest. Args: None Returns: None ''' has_no_lexer_assigned = editor.getLexerLanguage() == 'null' _, _, file_extension = notepad.getCurrentFilename().rpartition('.') if has_no_lexer_assigned and file_extension in self.known_extensions: self.init_lexer() console.write("check_lexers: {} {}\n".format(editor.getLexerLanguage(), has_no_lexer_assigned)) def on_bufferactivated(self, args): ''' Callback which gets called every time one switches a document. Triggers the check if the document is of interest. Args: provided by notepad object but none are of interest Returns: None ''' self.check_lexers() console.write("on_bufferactivated\n") def on_langchanged(self, args): ''' Callback gets called every time one uses the Language menu to set a lexer Triggers the check if the document is of interest Args: provided by notepad object but none are of interest Returns: None ''' self.check_lexers() console.write("on_langchanged\n") def main(self): ''' Main function entry point. Simulates the buffer_activated event to enforce detection of current document and potential styling. Args: None Returns: None ''' self.on_bufferactivated(None) console.show() sas_lexer = SasLexer() sas_lexer.main() """ example junk SAS (just lists some of the keywords): %let %do also cards class data input model ods proc var where %printz run * ... comment style 1; run // ... comment style 2; run /* comment style 3 */ 5 + 7 = 9 one blech """
  • RegExp to find path not working (any more)?

    4
    0 Votes
    4 Posts
    268 Views
    Claudia SvensonC

    @guy038 said in RegExp to find path not working (any more)?:

    Hello, @claudia-svenson, @ekopalypse and All,
    SEARCH / MARK (?-s)^.+\\

    It works.
    Thank you

  • How Do I Have Two Saved Files Separate Tabs In Each?

    5
    0 Votes
    5 Posts
    994 Views
    PeterJonesP

    @Mike-M-0 said in How Do I Have Two Saved Files Separate Tabs In Each?:

    What I am wanting is a second Notepad++ file/icon/shortcut with a different set of tabs.

    A tab in Notepad++ is just a way to show a file. It’s still considered a “file” even if you’ve never saved it to disk… it’s just a temporary file, and you’re tempting fate by never saving it.

    If you want to be able to have different sets/groups of files opened, you can File > Save Session… to save that “Session” to the disk in a known location. If you then later use File > Open Session…, that same list of files will be opened, assuming that you had actually saved any of those files to disk at any point. Saving a session with a bunch of never-saved files will save an empty session, which will probably upset you later.

    There are ways to make it so if you double-click on a session file, it will automatically open that session in Notepad++… but you are not yet to that skill level yet.

    ----

    Autosave/Backup FAQ Sessions docs from npp-user-manual.org MISC Settings > Show Only Filename in title bar {Advanced Skill} MISC Settings > Session file ext.
  • Use dark mode with a custom theme

    9
    0 Votes
    9 Posts
    2k Views
    Alan KilbornA

    @RARgames said in Use dark mode with a custom theme:

    Personally, the main issue that I have with the default dark mode is that selected line and not selected text colors seem to be inverted

    I suppose that was a design choice by the dark-mode author, no right and no wrong – if you don’t like it, feel free to swap them. (I think I would if I made the move to the “dark side”)

    @RARgames said in Use dark mode with a custom theme:

    Not really, I was trying to use it, but it doesn’t give enough “freedom”.
    I’m used to some random dark theme that I downloaded like 5+ years ago

    I often find new features the time to try to get used to something new; usually it works out well. Just a suggestion.

  • Trying to install the latest PythonScript plugin. (v3.0.14)

    3
    0 Votes
    3 Posts
    871 Views
    Jay SJ

    @Ekopalypse Thanks so much! I got everything up and running.

  • I'm getting a debug window when starting 8.4.2 on Windows 10

    2
    0 Votes
    2 Posts
    227 Views
    EkopalypseE

    @Rob-Holstein

    this screenshot reminds me of this issue with software like Slack, could this be your problem as well?

  • Lost all open notes

    2
    0 Votes
    2 Posts
    321 Views
    EkopalypseE

    @Péter-Rétvölgyi

    why not opening the files from the backup folder?

  • Replace all the "Square Brackets"

    5
    0 Votes
    5 Posts
    2k Views
    Rumi BalkhiR

    @PeterJones Thanks, I will go through the documentations once again. Thanks for understanding though.

  • 8.4.2 & 8.4.3 on Windows 10 keeps crashing

    2
    0 Votes
    2 Posts
    877 Views
    PeterJonesP

    @ipekerti ,

    see the debugging steps in the FAQ here, but most likely, one or more of your plugins need to be updated to work with Notepad++ v8.4-and-newer.

  • 0 Votes
    25 Posts
    3k Views
    PeterJonesP

    @pokemon-go ,

    This is a Notepad++ forum. Notepad++ is perfectly capable of doing the search and replace. There is no reason, in this Forum, to recommend switching to a proprietary, costly word processor to do a simple search-and-replace rather than using the free-and-open-source Notepad++ text editor that is that is the subject of this forum and has all the features necessary to make the change requested.

  • Session not loading any more

    8
    0 Votes
    8 Posts
    2k Views
    Terry RT

    @George-Master said in Session not loading any more:

    May be it’s not intended to let Notepad++ stay open while going to sleep mode.
    But that´s what I used to do all the time.

    I personally would NOT do that. Anytime you leave the PC for an extended period of time unattended (especially in sleep mode) with any applications open you are leaving yourself wide open for issues to arise.

    I’m confused by your conflicting statements of first not being to open the backup files, now you can. Since you can open now, the first attempt must have had unknown issues.

    The error message referred to the session.xml file and that’s what I thought was corrupt, not your actual backup files. That seems to be confirmed by your latest attempt to open the backup files.

    As for you saving files, only you can answer that question. If you cannot afford to lose data you need to maintain control over when and where the backups reside.

    Again, I can only refer you back to that FAQ post, there is lots of great information there about what to consider about the backup regime you use. But, and I can’t stress this enough, don’t go forward without at least setting the backup preferences to something you are happy with. Either change the Notepad++ settings or go for the plugin referred to in that FAQ post if wanting further guarantees.

    Terry