• V. 8.5.4 (64 bits) still crashing when opening a TXT file.

    2
    0 Votes
    2 Posts
    491 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
    392 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
    253 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
    503 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
    769 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
    241 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
    190 Views
    Alan KilbornA

    @Jay-E

    Turn off auto-update?

  • 0 Votes
    2 Posts
    190 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
    611 Views
    RJM 55R

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

  • File Viewer

    2
    0 Votes
    2 Posts
    801 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.

  • Preserve Style Tokens at Reload of File

    16
    0 Votes
    16 Posts
    3k Views
    nsk7evenN

    Haaaa … what a pity, just found a problem with using this solution for my use case:
    The style highlightnings are being stored/restored for each occurence. This means, newly appended log file lines won’t get the matching style highlightnings.

    (I tested the AnalysePlugin also, but - as expected - it is too bulky, buggy and restricted to its own result window; there are good use cases for this solution for repeating scenarios with identical and complex patterns, but it won’t fit for dynamic quick’n’easy highlightnings of always-other-keywords)

    Will go back to manually re-applying the 1-5 style tokens at each log file reload, until I find a better solution.

    Thanks for all suggestions and ideas, this was really inspiring!

  • PO files syntax color, where can I find it?

    4
    0 Votes
    4 Posts
    718 Views
    Green_goblinG

    @PeterJones
    Ok, I’ve never tried to create a UDL from scratch bit I’ll try now. Regards!

  • Incorrect formatting of comments in batch files

    Locked
    2
    0 Votes
    2 Posts
    157 Views
    Alan KilbornA

    @wallobit

    Please don’t post the same thing in multiple threads.
    See my response in the other thread HERE.

  • 3 Votes
    7 Posts
    3k Views
    Mark OlsonM

    Permanent link to most up-to-date version

    Things fixed since my original post above:

    Caching problems (my original assertion that files were re-parsed only as needed was actually false) Originally if you used $0 in your output format to get all the matched text (not just capture groups), the output file would contain the BEL characters I used to delimit the capture groups in the intermediate file. Allow group_by and join to group by/join by multiple columns. See docs in file. Added byind and bykey convenience functions for easier sorting by index/key in child.
  • RegEx - Finding strings when another substring not present

    14
    2 Votes
    14 Posts
    721 Views
    Zeff Wheelock 0Z

    @Alan-Kilborn just adding that the version that I was using did not have the option in Mark to Copy Marked Text. I was one version behind. Upgrading Notepad++ gave me that option.

  • Recent upgrade

    5
    2 Votes
    5 Posts
    297 Views
    John SweetJ

    It was #2, I had global override on. I’ve shut it off, now back to normal.
    I guess I was trying so many things, I didn’t realize I had this on.

    Thanks so much for your help!

  • Keep non existing file requires Yes to all and No to all !

    4
    0 Votes
    4 Posts
    528 Views
    Alan KilbornA

    @mkupper said in Keep non existing file requires Yes to all and No to all !:

    I deal with it by right clicking on the npp tab for any file and selecting one of the Close All options. Normally I use iClose All to the Right which will quickly and quietly close thousands of open tabs for files that have been deleted.

    If you are already at the Keep non existing file pop-up then select Yes and then do the Close All thing. You will get a save this file? yes/no prompt for the single file that you had said “yes” on keeping to earlier and can now chose “no” as you don’t care about it.

    I can only find one thing wrong with this.
    It should have started out with the text: PRO TIP:
    Seriously, a great tip!
    Thanks for sharing.

  • move to the next _numbered_ line

    7
    0 Votes
    7 Posts
    2k Views
    Nick KatN

    @PeterJones awesome! You are the best!! Thank you!!!

  • Rename files based on data from within

    3
    0 Votes
    3 Posts
    270 Views
    wonkawillyW

    @Don-Sullender

    I don’t know win2019 server but what you ask is possible to be done even with just few rows of powershell or vbs code, if the OS has one of them.
    Also if the files you have to handle have a fixed schema will be relatively easy to implement a script.