I don’t think this “contextMenu.xml” fully corresponds with your screen shot earlier in this topic, but the "Language Syntax " does, and that’s sufficient. Also, your commented-out example on how to get Russian output clearly illustrates that mechanism.
Thx for sharing!
I am going to take a wild guess (though you weren’t very clear in your original post), since you included the Notepad++ specific shortcuts.xml reference, that you are editing your website code (assumed HTML) in Notepad++, and used Run > Launch In Chrome to view your website in a browser.
I am further going to assume that you named your file blah rather than blah.html, because then Chrome would have no reason in the world to assume that the underlying bytes were meant to be html, and would thus show you the raw source code, rather than rendering the HTML. I am going to assume that Microsoft, in their Edge browser, like in many other Microsoft products, assumes it knows better than the user what should really happen, and ignores the filetype, and instead guesses at the “real” filetype, even when you pass it a file with no extension
Fortunately, if I am right, Notepad++ will be very useful, because it will show the full file path, including directory, name, and extension, in the title bar (unless you have set Settings > Preferences > MISC to enable Show only filename in title bar as described in the official preferences documentation – if so, disable that). Or you can hover over the tab name, and the full path, name, and extension will be shown. If I am right, use File > Rename to fix the name to actually include .html in the name.
I could be wrong, however, because you gave us next to nothing to go on. Or Alan could be right, and you were actually asking an HTML/webcoding question rather than asking a question specific to Notepad++.
But I’m hoping that my wild guess is right, and I’ve been able to help you, despite your lack of information. Or that, at the very least, it will encourage you to provide more information so that we can help you. (Though if it’s an HTML question, Alan is right, and this isn’t the right place)
I’m using the robocopy command line option /UNILOG to write the log file, but it seems to be broken - it doesn’t really write Unicode. Reconfiguring Notepad++ just for the sake of correctly displaying the robocopy logfile is not an option for me, because Notepad++ is my standard editor for nearly everything.
There can never be too many command line options though, so I’d strongly vote for a possibility to indicate the character set/encoding when opening a file. I’ve just created Github issue #8082 for this.
@Terry-R I don’t have any sync software configured on the directory in question. And the issue isn’t that the contents of the file are being overwritten, it’s that I don’t even have the option to save new files after the initial save. The Save command is disabled in the menu, the Control-S keyboard shortcut doesn’t work, and all visual indicators inside of Notepad++ that normally indicate that a file has been modified aren’t working. I can make changes in the file all day long and it refuses to let me save.
Ah, of course, if you want to capture part(s) of the regex, needed in replacement, you need to surround these parts with parentheses. In that case we have to change the non-capturing group (?s:.+?) into a capturing group, with the in-line modifier inside so the new syntax ((?s).+?)
So the final regex would be :
with two groups :
The header line with its EOL ( group 1 )
The subsequent lines of each block, with their line-breaks ( group 2 )
However, as you said :
so that it captures the Header line (without the EndofLine)
This final regex should be :
I solved my corrupt file with Recuva software after a blue screen in windows, I followed the instructions in the following post: https://superuser.com/questions/377904/recover-file-corrupted-due-to-power-cut-off and voila!! Thanks
@Sarah-Duong said in Remove duplicate lines in separate files:
This is really difficult for me.
Well, you have presented quite a significant problem, mainly due to the size. The actual process (as I’ve outlined previously) is not difficult, but given the number and size of the files the solution will take some effort by you to complete.
So do you want a solution in the Windows environment or were you considering the Linux solution in which case this thread (collection of posts) can close?
You say the average filesize is 200000 lines, if we suggest an average of 18 (you said 5 to 30 characters per line) characters per line this makes an average filesize of 3.6MB. I haven’t personally worked on a file of this size, however I’m sure NPP is capable of filesizes much larger. It can depend upon the environment such as whether NPP used is 32bit or 64bit, and whether you have additional plugins loaded.
I still think it will only be possible to use NPP is the files are broken down into groups which will mean sorting each file first and breaking them apart by the first 1 or 2 characters. Then processing each group separately.
Please advise whether you still want to consider this approach, we (on the forum) can help you, but be aware it will be a lengthy job.