• Double click not selecting all occurrences of a word

    13
    0 Votes
    13 Posts
    4k Views
    Terry RT

    @Peter-Finch said in Double click not selecting all occurrences of a word:

    downgrading to 8.2 fixed the issue and I can now open a 649MB log file and highlight text.

    Glad you have a solution.

    Might I suggest installing the “portable” version of 8.2 for this type of work, then you can also have the latest “installed” version for any other work if you require some of the latest features.

    If you do so, then the installed version gets auto updated (if you have that setting), whereas the portable will never auto update.

    I think some who operate this way also have the portable version colourized so status bar etc help them to realise which version they are running.

    Terry

  • Delete lines with a date older than a week old.

    5
    0 Votes
    5 Posts
    719 Views
    Dennis PratherD

    Thank You ill give it a try.

  • Can NPP find my MinGW inside NPP Folder?

    4
    0 Votes
    4 Posts
    320 Views
    PeterJonesP

    @Dedi said in Can NPP find my MinGW inside NPP Folder?:

    @Ekopalypse
    Thank you for your reply. I already found out how.

    FYI, when you update NPP, assuming you put it under a different folder name, you will have to edit your script to match. If you use what @Ekopalypse suggested, you won’t have to:

    ENV_SET PATH = $(NPP_DIRECTORY)\MinGW;$(NPP_DIRECTORY)\MinGW\bin NPP_SAVE cd $(CURRENT_DIRECTORY) g++ -Wall $(FILE_NAME) -o $(NAME_PART) NPP_RUN cmd /k $(NAME_PART)

    hope this helps

  • Notepad++ 8.4.4.0 64-bit, instant crash. Windows 10

    12
    0 Votes
    12 Posts
    2k Views
    Dean-Ryan StoneD

    @PeterJones I had that file in the folder, but it was empty.
    Because I’m paranoid enough to backup my APPDATA folder to multiple locations local as well as on NAS, I found the older file and just copied back in the contents into the empty file.

    Now I see the following when going to execute NPPExec Script:

    f02db324-3ae6-4f5f-9459-a794486c9492-image.png

    Notepad++ 8.4.4 non-portable now starts up without error/console. Hooray!

    Because I’m also using ExtSettings to modify the ascent/descent settings I’m probably doubling up on things but hey.

    For the life of me I don’t know the original reason that NPP was failing to start, but for right now it’s working great and I’m happy.

    Thank you both for your wisdom and assistance!

    Regards
    Dhry

  • How do I create a new User Defined Language "based on" an existing one ?

    13
    0 Votes
    13 Posts
    6k Views
    EkopalypseE

    @Chal-Chinehsoyo

    see here for the news :-)

  • Why isn't CSV a file type?

    4
    0 Votes
    4 Posts
    2k Views
    Michael VincentM

    @don-Vickers-0

    Realize your issue is just filter when opening, but if you’re opening CSV files you’re probably working with them - and hope you’re aware of 2 great CSV plugins for Notepad++:

    https://github.com/jokedst/CsvQuery https://github.com/BdR76/CSVLint

    Cheers.

  • 0 Votes
    4 Posts
    3k Views
    PeterJonesP

    @Игорь-Алексеев said in Изменение параметров выделенного текста:

    And how can you get out of the situation?

    There isn’t a “situation” to get out of. Text files have no concept of bold, so Notepad++ cannot make text in the text file bold. If you want to control presentation like that, a text file and a text editor are not the right format and tool for you. (I think you need to learn the difference between a text editor and a word processor.)

  • Menu has a gap after upgrade to v8.4.4

    3
    0 Votes
    3 Posts
    276 Views
    Senthil AkS

    @PeterJones thanks so much for the information.

  • Error message on start about (deselected) GedcomLexer plugin.

    2
    0 Votes
    2 Posts
    270 Views
    PeterJonesP

    @Arman-2 ,

    Depending on the permissions on the c:\program files\notepad++\plugins\ folder hierarchy (or equivalent), Notepad++ may try to remove the old GedcomLexer plugin, but not be successful. Your options at this point are 1) to right-click on Notepad++.exe and Run as Administrator, and see if that will allow it to fully uninstall the incompatible plugin; or 2) to delete the c:\program files\notepad++\plugins\Gedcom (or equivalent)

    And it appears that a new version of GedcomLexer has been released which you can manually download and install, to make it compatible with Notepad++ v8.4-and-newer.

  • ALTGR disable

    3
    0 Votes
    3 Posts
    411 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
    528 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
    566 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
    2k 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
    235 Views
  • sidebar with lines i need to have reference to

    7
    0 Votes
    7 Posts
    646 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
    1k 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
    660 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
    306 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
    7k 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
    290 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