• How To Keep Text Highlighting After closing the document?

    18
    0 Votes
    18 Posts
    7k Views
    Pika714444P

    @Alan-Kilborn

    I hope they do it ASAP because it will be a very beneficial feature for highlighting a specific important words/sentences/line in a large text output file , this is the feature i needed actually from the purpose of this post.

  • Find results not visible when 3th screen is off

    2
    1 Votes
    2 Posts
    339 Views
    Alan KilbornA

    @Arne-Everhard said in Find results not visible when 3th screen is off:

    Is this a bug or something to live with.

    Probably considered a bug; you can file a bug report by following instructions HERE if you’d like.

    Workaround:

    Immediately after running a search that should show you the Search results window but doesn’t, press Alt+spacebar, then press m. What this does for me (on Win11, and hopefully for you as well) is put a “ghost” rectangle on the monitor which currently has the mouse cursor on it. You can then move the ghost rectangle to where you want it (by simply moving the mouse – the ghost will follow), and finally left-click to have the real window appear.

    Side note: THIS thread has further info about making non-seeable windows seeable again.

  • Suggestions

    2
    0 Votes
    2 Posts
    222 Views
    Mark OlsonM

    @Robert-Phillips
    I recommend you look at the issues, check if someone’s already submitted an issue like yours, and submit an issue if not.

  • macro carriage return = 
 with update v.8.5.3

    11
    0 Votes
    11 Posts
    2k Views
    PeterJonesP
    Good News

    I have confirmed this morning that the following macro will work with v8.5.2, v8.5.3, and v8.5.4, embedding the CRLF newline in each:

    <Macro name="Newline 2digit" Ctrl="no" Alt="no" Shift="no" Key="0"> <Action type="1" message="2170" wParam="0" lParam="0" sParam="&#x0D;" /> <Action type="1" message="2170" wParam="0" lParam="0" sParam="&#x0A;" /> </Macro>

    So the two-hex-digit entities work, but the four-hex-digit ones do not. I will shortly be updating the FAQ to match.

  • 0 Votes
    4 Posts
    760 Views
    Mark OlsonM

    Yep, AlanKilborn is right, I misunderstood your question.

    Assuming you’re trying to use a find/replace to convert the first example to the second example, I recommend

    FIND: (?s-i)(?:^for\R|(?!\A)\G)(?:(?!\Rnext$).)*?\K^
    REPLACE WITH \x20\x20

  • Ersetzen durch Absatzmarke

    2
    0 Votes
    2 Posts
    429 Views
    Alan KilbornA

    @Thomas-Rammler said in Ersetzen durch Absatzmarke:

    I can’t find how to replace characters with a paragraph mark (creating a new paragraph).
    Does anyone know a way to get there or could it be implemented?

    What’s a “paragraph mark”? Do you mean you have a pilcrow character embedded in your text file?

    If so, select just that character and press Ctrl+h. It should appear in the Find what box. Change to the Replace with box and enter \r\n\r\n. Change the Search mode to be Regular expression.

    This should get you what you want or close to it, as near as I can tell from your description.

  • Can anyone confirm this issue with EditorConfig?

    3
    0 Votes
    3 Posts
    304 Views
    timintT

    @mpheath Wohoo!! That was it, thank you a lot! I really needed a pair of fresh eyes. 👍👍

  • Foreign characters (Cyrillic) issue

    5
    0 Votes
    5 Posts
    412 Views
    gerdb42G

    And also paste the “Debug Info” as this might be a plugin issue.

  • .LOG updates

    4
    2 Votes
    4 Posts
    3k Views
    PeterJonesP

    After I and @rdipardo had both separately confirmed that MS notepad.exe really does have that feature, I decided it was worth the effort to write the script, even if the original poster never comes back to ask for it.

    Installation instructions

    see full instructions in our FAQ
    https://community.notepad-plus-plus.org/topic/23039/faq-desk-how-to-install-and-run-a-script-in-pythonscript save the script below as DotLogTimestamp.py in the PythonScript user-scripts directory (usually %AppData%\Notepad++\Plugins\Config\PythonScript\Scripts\) if you want this feature active every time you run Notepad++: Plugins > Python Script > Configuration: set Initialisation to ATSTARTUP As the FAQ mentions, add the following lines to the user startup.py import DotLogTimestamp _DLTS = DotLogTimestamp.DLTS() script: DotLogTimestamp.py # encoding=utf-8 """in response to https://community.notepad-plus-plus.org/topic/24650/ - Call this from startup.py using import DotLogTimestamp _DLTS = DotLogTimestamp.DLTS() - Make sure to set Plugins > PythonScript > Configuration > Initialisation to "ATSTARTUP" instead of "LAZY" - installation instructions: see https://community.notepad-plus-plus.org/topic/23039/faq-desk-how-to-install-and-run-a-script-in-pythonscript """ from Npp import editor,notepad,console,NOTIFICATION from datetime import datetime class DLTS(object): def __init__(self): console.write("Registered DotLogTimestamp.py callbacks\n") notepad.callback(self.fileopened_callback, [NOTIFICATION.FILEOPENED]) notepad.callback(self.bufferactivated_callback, [NOTIFICATION.BUFFERACTIVATED]) self.active = True self.bufferIDs = [] def toggle(self): self.active = not self.active console.write("DotLogTimestamp.py callbacks are {}\n".format('active' if self.active else 'inactive')) def fileopened_callback(self, args): if self.active: self.bufferIDs.append(args['bufferID']) def bufferactivated_callback(self, args): if self.active: if args['bufferID'] in self.bufferIDs: line = editor.getLine(0).strip() if line[0:4] == ".LOG": editor.appendText("{}\n".format(datetime.now().strftime("%Y-%b-%d %H:%M:%S"))) self.bufferIDs.remove(args['bufferID']) if __name__ == '__main__': try: _DLTS.toggle() except NameError: _DLTS = DLTS()
  • V. 8.5.4 (64 bits) still crashing when opening a TXT file.

    2
    0 Votes
    2 Posts
    495 Views
    PeterJonesP

    @PaulStSmith ,

    Opening Notepad++ by the shortcut or Start Menu, everything works fine.

    You most likely have two copies of Notepad++ installed; your file association is pointing to one which is crashing (maybe because of an incompatible plugin installed; follow this FAQ’s debug procedure); and the other (which you get to by your shortcut or start menu) points somewhere else.

    Right click on the shortcut or the start menu entry, look at the shortcut Properties, and look at the shortcut’s Target path.

    Then run regedit.exe and search for notepad++.exe – you will most likely find that one or more of the mentions in the registry point somewhere different than your shortcuts do.

  • General help to built N++ macros in file "shortcuts.xml"

    3
    7 Votes
    3 Posts
    398 Views
    guy038G

    Hi, All,

    So, I tried to follow the right way with script plugins and did some tests with, either, the NppExec, Python Script and LuaScript plugins.

    However, I could not get the Line Number margin to toogle from visible to invisible status and vice-versa !

    For instance :

    On NppExec console ( v0.84 ), the two commands :

    npp_sendmsg WM_COMMAND IDM_VIEW_LINENUMBER

    npp_sendmsg WM_COMMAND 44012

    do not work

    On Python console ( v2.0.0.0 - Python 2.7.18 ), the two commands :

    notepad.menuCommand(MENUCOMMAND.VIEW_LINENUMBER)

    notepad.menuCommand(44012)

    do not work, as well

    On LuaScript console ( v0.12 - Lua 5.3 ), the two commands :

    npp:MenuCommand(IDM_VIEW_LINENUMBER)

    npp:MenuCommand(44012)

    do not work, also

    Apparently, adding the options Constant and Dynamic width, regarding the Line Number margin, in N++ v7.9.2, breaks down this functionality, since that version :-((

    I should have realised that before ! If it was impossible to get this fucntionality with a N++ macro, this necessarily meant that NO script plugin could do any better !

    To be sure that I correctly used the scripts syntax, I did some tests with two other functions, which worked perfectly :

    On NppExec console :

    npp_sendmsg WM_COMMAND IDM_VIEW_REDUCETABBAR or npp_sendmsg WM_COMMAND 44005 reduce/enlarge the tabs

    npp_sendmsg WM_COMMAND IDM_FILE_NEW or npp_sendmsg WM_COMMAND 41001 open a new file

    On Python console :

    notepad.menuCommand(MENUCOMMAND.VIEW_REDUCETABBAR) or notepad.menuCommand(44005) reduce/enlarge the tabs

    notepad.menuCommand(MENUCOMMAND.FILE_NEW) or notepad.menuCommand(41001) open a new file

    On Lua console :

    npp:MenuCommand(IDM_VIEW_REDUCETABBAR) or npp:MenuCommand(44005) reduce/enlarge the tabs

    npp:MenuCommand(IDM_FILE_NEW) or npp:MenuCommand(41001) open a new file

    So, how to be able to show / hide, easily, the Line Number margin ?

    May be, I need the @astrosofista’s skills as he could provide us with an AutoHotKey script to achieve this goal ?

    Best Regards,

    guy038

  • How run a command with Workspace file folder?

    2
    0 Votes
    2 Posts
    255 Views
    PeterJonesP

    @Goldfish-Village ,

    I am assuming by “Workspace file” that you mean the XML file where Notepad++ stores the Project Panel’s Workspace information.

    If I interpret correctly, then as far as I know, Notepad++ does not currently have a way to share the filename or directory for that workspace-definition file. Sorry.

    If I did not interpret correctly, then I don’t know which file you are talking about. Sorry.

  • Word Count?

    5
    0 Votes
    5 Posts
    520 Views
    guy038G

    Hi, @osgaldor, @coises, @mark-olson, @alan-kilborn and All,

    @mark-olson, I suppose that, in your recent wordcount.py script, on GitHub, the part :

    curline = editor.lineFromPosition(curloc) curcol = editor.getColumn(curloc)

    should be changed as :

    curline = editor.lineFromPosition(curloc) + 1 curcol = editor.getColumn(curloc) + 1

    Best Regards,

    guy038

  • Rename the TAB, not the file.

    6
    0 Votes
    6 Posts
    817 Views
    mkupperM

    @Alan-Kilborn said in Rename the TAB, not the file.:

    use mklink /H instead of a plain mklink

    However, what it needs is a little bit of a script wrapper …

    It’s possible that the project names or whatever it is then generates the log files don’t change often. In that case, a one time setup from the command prompt, without bothering with scripting it, will do.

    It’s also possible the log files live on different servers and the OP is accessing them via drive shares. In that case, mklink /H won’t work. However, the mklink version without the /H will work but also requires extra steps. If the OP is in this situation then Google for mklink, the error message, maybe “drive share” will lead to forums where solutions get guessed at.

    As I am trying to keep this as a Notepad++ oriented post. I guess I can say that a colorful Notepad++ flew by my office window but then we’d get distracted discussing its size, arrangement of feathers, etc…

    Something else is that when you hover the mouse on a tab in Notepad++ the hover-tip has the full path.

    On my machine file://c:/some-path gets underlined in Notepad++ and can be double-clicked to open the file. I have some projects that include sets of related text files. I have been in the habit of adding an Also see section at the tops of the files that contain links to all of the files in the project. That allows me to Ctrl-Home to the top of a file and then to double-click the Also see link for the file I want to view. If the file is not open then Notepad++ opens it. If it’s already open then Notepad++ jumps to that tab. It still means the tabs would say “log.txt” but I at least can reliably get to the one I’m seeking with a little effort. I put the Also see on the same line in each file and they have the same layout meaning the screen instantly jumps to the desired file and I can easily jump around between the files as the text in the area of the the mouse is not changing.

    Web browsers do not offer the ability to rename tabs but each site offers an icon file that the browsers include with each tab. We look at the bower tabs and get used to using the icons to know which tab is the one we are seeking. That concept may be an interesting and potentially useful add-on to Notepad++. It would be a mapping table that translates a file path into the icon, color styling, and text to display on that tab for that file path.

  • Issue with deleting search results - application gets unresponsive

    3
    0 Votes
    3 Posts
    244 Views
    MichaelM

    @PeterJones
    I had only combined two screenshots in one, it was not searching in the meanwhile.

    But yes you are right, i try to grab thousands of files with hundreds of thousands or millions of matches

    thank you for mentioned option, that might help next time, when i go through several files

  • remove dialog popups

    3
    0 Votes
    3 Posts
    192 Views
    Alan KilbornA

    @Jay-E

    Turn off auto-update?

  • 0 Votes
    2 Posts
    193 Views
    PeterJonesP

    @DavidSzumskiAzureAD ,

    This is a forum about Notepad++, a text editor. It is not the place for generic computer questions

  • Replacing character in column 1 with FF Character?

    3
    0 Votes
    3 Posts
    627 Views
    RJM 55R

    This is exactly what I needed! Thank you very much!!!

  • File Viewer

    2
    0 Votes
    2 Posts
    812 Views
    Lycan ThropeL

    @Roy-Hughes ,
    Suggest you read the Online User Manual, to find out these answers. This one can be answered by the following screenshot.

    AddFileExt.PNG
    You enter an extension in the User ext: box that is circled in the screenshot, Save and Close and it should work for that file extension from then on.

  • 0 Votes
    4 Posts
    1k Views
    PeterJonesP

    @Mark-Olson said in How can the direction be automatically from right to left when opening a file?:

    I’m having trouble getting it to show my text RTL.

    If you look through the change history, there have been a few “RTL” changes over the last year or two.

    At this point in Notepad++, I believe it only shows RTL with letters from RTL scripts, but things like selections still behave in a RTL way because of the RTL setting. (Type a quick sentence with your normal text input; make sure you’re on RTL mode, and double-click the first word; notice that the last word is selected; now use Ctrl-RightArrow to move the caret in the “right” direction and watch the cursor jump leftwards.) To have RTL make sense, I think you need to use something like Arabic or Hebrew characters.