• Persist folding between sessions?

    7
    1 Votes
    7 Posts
    2k Views
    PeterJonesP

    Fortunately, if you try to fold an unfoldable line, nothing happens (at least in my experiments). As far as I know, no data can be lost from improper folding (View > Unfold All should always show everything again). And I did try to make it clear that “if [the] original file changes between the save and the load, the state is unpredictable.”

    In case I wasn’t clear enough:

    warning / disclaimer

    @Sal-Ricciardi, the PythonScript solution shown is only a hack for solving a very limited subset of the problem, as a proof of concept – specifically, re-applying the same fold levels to the exact same state of a particular file. You are responsible for keeping proper backups of important data. You are responsible for ensuring you load the correct fold-save file for a given file. You are responsible for making sure that the file doesn’t change between loads.

    If you would like more features, you may feel free to develop the above script into a more feature-rich version of the PythonScript, or use the PythonScript shown as a basis for a full-fledged plugin.

    I make no guarantees or warranties. But I do hope this helps you.

  • Files of type:

    5
    0 Votes
    5 Posts
    377 Views
    PeterJonesP

    @Prahlad-Makwana4145 ,

    While I applaud your desire to help, the question @Scott-Bolton asked was about the file type extension lists in the File > Open and File > Save dialog boxes. The changes to lexer syntax highlighting settings will not affect the Open or Save dialogs at all.

  • "Tab X of Y" in Title Bar

    4
    0 Votes
    4 Posts
    5k Views
    Alan KilbornA

    @Stefan-Travis said in "Tab X of Y" in Title Bar:

    it can get tricky remembering which tab has which file. I think a numbering system would help

    Isn’t there already a numbering system?:

    f783be9c-3bab-4869-b42c-d7047f329967-image.png

  • Notepad++ crashes and erases the file being worked on.

    28
    1 Votes
    28 Posts
    17k Views
    pnedevP

    @gstavi ,

    Good points.

    I hope you indeed fixed ALL the races

    I did. Those related to periodic backups.

    I am not convinced about disk caching explanation because this should have made it a common problem for lots of application.

    It is apparently a common problem for other applications too.
    Here is another debate on the topic:
    https://community.notepad-plus-plus.org/post/48725

    Your patch looks good but to avoid the disk caching problems you need to use FILE_FLAG_WRITE_THROUGH (or in your used Win API it should be _WRITE_THROUGH, I’m not sure) when creating/opening the files.

    As I’ve written before in several places the problems are two:

    fopen erases file contents on open with write permissions. This is causing the “no-space on disk” file contents loss problem and perhaps the problem you have encountered and are mentioning here. File contents loss on reboot/power loss (even when files are edited and saved) are caused by disk write caching (defined by Microsoft as “lazy writer” in some of their documents).

    Perhaps a combination of reasons will convince @donho at some point.

    I doubt it. A lot of people (including me) had given him a lot of reasons already including the root cause of the problems and a possible fix.

    Do remember it if you ever choose to fix the out-of-space bug by creating a new file

    I though about it in the beginning when I was trying to figure out the cause of the write issues.

    In my PR I actually use native Win32 file handling API as you do in your patch to avoid the fopen file contents erasure. There is no need to create new file in that case - forget that I mentioned it (it was just a possible and sub-optimal workaround to the first problem I gave above).

  • Notepad++ have extra height pixel line

    1
    0 Votes
    1 Posts
    298 Views
    No one has replied
  • accidentally deleted document selector

    7
    1 Votes
    7 Posts
    550 Views
    Murray Sobol 0M

    @PeterJones

    Thanks, that was the step I was missing.

    Murray

  • Slow to reload in larger files

    4
    0 Votes
    4 Posts
    366 Views
    EkopalypseE

    @Kelly-Hoke

    that would indicate that the lexer, which was active, isn’t capable of
    lexing the document fast enough. Was this an udl or a standard lexer?

  • Bug: Search/Replace All does not replace all

    4
    0 Votes
    4 Posts
    701 Views
    guy038G

    Hello, @jay-imerman and All,

    And, if you run this S/R, using the Regular expression search mode, you must adopt this syntax :

    SEARCH "

    REPLACE \\"

    because the Escape \ is a special regex character and needs to be escaped, itself, with an other \ symbol, to be taken as a literal !

    Best Regards,

    guy038

  • a string to search containing “the new line"

    2
    0 Votes
    2 Posts
    609 Views
    Alan KilbornA

    @Tuan-Zuli

    It appears you are talking about using the Pythonscript plugin?

    Maybe you want something like this? (Hard to say definitively without further detail being provided):

    editor.replace('aaa\r\nbbb', 'AAA\r\nBBB')

    Of course the use of \r\n is for Windows files only. If your files are Linux you want to drop the \r and use only \n.

  • Count now counts from the cursor rather than whole doc

    4
    0 Votes
    4 Posts
    275 Views
    Alan KilbornA

    Supporting info:

    See the 7.8.5 change.log entry:

    Make Count command in Find dialog respect Backward-direction and Wrap-around options.

  • Scrolling with down and up arrow keys

    4
    0 Votes
    4 Posts
    3k Views
    Prahlad-Makwana4145P

    Hello, @Brigham-Narins

    Follow Information, To Scrolling with down and up arrow keys:

    Ctrl+Shift+↑/↓ is supposed to move lines in Notepad++. Shift+↑/↓ will select text. Shift enables text selection as cursor moves either with arrows or Home/End/Page Up/Page
    Down keys
    Ctrl+←/→ makes cursor move by words instead of characters Ctrl+Page Up/Page Down jumps to actual next page, not just next screen Ctrl+Home/End jumps to beginning/end of the document

    I hope above information will be useful for you.
    Thank you.

  • Seems to be a bug in the Find All functionality

    2
    1 Votes
    2 Posts
    289 Views
    Vitalii DovganV

    I’ve created the corresponding issue on GitHub:
    https://github.com/notepad-plus-plus/notepad-plus-plus/issues/8034
    It contains two test files attached, as well as two words to be searched for to reproduce the issue in the whole scope.

  • Post-It mode disable always on top

    1
    1 Votes
    1 Posts
    1k Views
    No one has replied
  • [Feature Request] MD5 in the context menu

    11
    0 Votes
    11 Posts
    1k Views
    jankozaJ

    @PeterJones, @Alan-Kilborn

    It works. Thanks a lot.

  • Opening a file in short form?

    2
    0 Votes
    2 Posts
    230 Views
    PeterJonesP

    @Mark-Hanshaw said in Opening a file in short form?:

    Hopefully I’m including enough information to explain my lostness

    Unfortunately, not even close. Sorry.

    Not everyone here knows what CSR2 is – based on your mention of “car files”, I am assuming the top google hit of a racing game is probably it. Given that the game itself isn’t necessarily common knowledge here, us knowing what might be different between the “version 1” and “version 2” car files is rather unlikely, and it’s really hard to give you help with so little information.

    The instructions you were given (“look for \s and replace all”) aren’t even complete. I am assuming they wanted you to replace all space character – in which case, you need to make sure you have the regular expression mode selected the Replace dialog – because \s can be the special regex sequence to match any whitespace (space, tab, newline, and some others). Also, you don’t tell us what they asked you to replace the \s with.

  • How to delete all characters after 1 character

    2
    0 Votes
    2 Posts
    515 Views
    Alan KilbornA

    @Sarah-Duong

    You probably also want to remove the space before the vertical bar as well?

    Try this:

    Find what box: (?-s) \|.+
    Replace with box: Make sure this box is EMPTY !
    Wrap around checkbox: ticked
    Search mode radiobutton: Regular expression
    Press the Replace All button

  • MD5 vs SHA-256 in the contextMenu

    4
    2 Votes
    4 Posts
    554 Views
    PeterJonesP

    That is, BTW, one of the reasons I decided to take an active role in the documentation development: whenever I find there’s something that I cannot remember how to do, I check to see if it’s in the docs; if it’s not there, I like being able to add it in so that 6 months down the road, when I’ve forgotten it again, I can look it up. :-)

  • Disable autodetect syntax by content

    14
    0 Votes
    14 Posts
    1k Views
    EkopalypseE

    :-D
    :-D

  • Notepad++ 7.5.4 (64-bit) slow working with large files (solved)

    2
    2 Votes
    2 Posts
    2k Views
    Alan KilbornA

    @jack4455667788 said in Notepad++ 7.5.4 (64-bit) slow working with large files (solved):

    this may have been fixed in later releases

    How does one “fix” this? Autocomplete is a feature, if it is turned on it will attempt to do its work as best it can. In some scenarios, it isn’t going to be optimal.

  • Figure this would be an easy add...

    2
    1 Votes
    2 Posts
    433 Views
    PeterJonesP

    Interesting. There might be enough people who would want that function for it to be worth implementing – though I cannot remember ever thinking to myself that I missed that ability, so it might not become a high priority for the developers. But the idea is reasonable enough that it’s probably worth reading the FAQ that will direct you to the right location for feature requests and bug fixes.