• replace in txtFile with mixed Codepage letters utf8 and ANSI

    3
    0 Votes
    3 Posts
    755 Views
    Rainer KlinglerR

    @PeterJones Thank you very much - it works! But you must be careful after some replaces exists new “wrong” Chars in ANSI view with the possibility of also not wanted newly replacements … so the replace all button is dangerous…

  • Files open twice

    17
    0 Votes
    17 Posts
    5k Views
    CoisesC

    @Coises said in Files open twice:

    I’ve opened an issue for this: Symbolic links and hard links can result in the same physical file being open in multiple tabs.

    It seems the matter is not as straightforward as it appeared to me. At least one person strongly disapproves of changing the current behavior at all.

    I don’t really use symlinks. If some of you do, and have clear ideas about how they should work — whether they should resolve to the target name, like a shortcut, or remain as their own name in their own directory, like a hard link — you might be able to contribute to the discussion at the link above.

    Three notes:

    I offered a pull request along with the issue, but another user (the same one who objects to changing anything) discovered an important flaw. While that’s mixed up in the discussion, it’s really a separate issue from what should happen. If we reach a consensus on what should happen, I’m sure there will be a way to fix the flaw (which causes symlinks with a relative path to fail completely).

    As things are, File|Open and double-click in Explorer behave differently than opening from the command line and right-click|Open with Notepad++ in Explorer. I see no way to change the File|Open and double-click behavior, because Windows is resolving the symlink in those cases before Notepad++ ever sees it. As far as I can tell, the person who doesn’t want things changed believes the other behavior is “correct,” and doesn’t care that the behavior in some cases doesn’t match. Honestly, the more I look at the way different programs behave, the more it seems to me there is no consistency regarding this in Windows. I’m not sure if that’s an argument for letting the chips fall where they may, or if Notepad++ should still at least be consistent with itself.

    Though I now think I was unwise to do so, I combined two distinct issues: opening symlinks in particular, and avoiding opening the same file by two separate names (which affects both symlinks and hardlinks). The latter is the one more directly relevant to the original complaint in this thread. The fix for that appears straightforward and is independent of the flaw that caused a problem with my pull request. (My solution just activates the tab holding a file which is already open, regardless of whether you’re trying to open it under a different name.) However, the user who does not want anything changed apparently does not want Notepad++ to suppress opening the same file under two different names either.

  • 0 Votes
    5 Posts
    504 Views
    BenLaKnetB

    @Alan-Kilborn OK many thanks, I understand the differences.

  • Is there a way to Hightlight Partial Search Results?

    3
    0 Votes
    3 Posts
    394 Views
    Cr8zy_IvanC

    @Coises Oh man! That’s so Awesome. Thank you!

  • nested keywords

    3
    0 Votes
    3 Posts
    345 Views
    Junior MaihJ

    @mkupper
    Thank you so much for the reply. Your suggestion works for another instance (!else and !elseif) but not in the case I mentioned because I also use !end in the “Folding in code 1 style”. I have even removed !end from the list of keywords but it does not help.

    Thanks again for taking the time to reply!

  • How to set characters colors at Compare Plugin

    3
    0 Votes
    3 Posts
    965 Views
    R D MR

    @PeterJones said in How to set characters colors at Compare Plugin:

    I would suggest you change the background colors (which can be set in the Plugins > Compare/ComparePlus > Settings dialog) to darker highlights… maybe a dark green, dark purple, dark navy, dark brown, dark orange, rather than the default light versions of those colors.

    Done, thanks!

  • Need to, in steps, copy/cut/paste

    4
    0 Votes
    4 Posts
    630 Views
    PeterJonesP

    @Bertil-Wallman said in Need to, in steps, copy/cut/paste:

    @PeterJones
    Hi Peter…

    (?-s)^nid (".“)\r\nnstr “”* didn’t work for me, so i tried it bit by bit and this > (?-s)^nid (".”)\nnstr “”* worked much better.

    Notepad++ is a Windows text editor, so assuming Windows line endings is natural, and works for the majority of the people; if you had mentioned that you were using Linux line endings, I would have customized the expression for your actual data.

    That instruction… "initial = 1, increase = ``, leading = none… the increase part didn’t work for me either, the box didn’t allow me to add those characters,

    That was a typo on my part. It should have said “increase = 1” – I just missed the 1 in between the ` characters for trying to make the 1 red like 1 .

    And that \bnstr \b didn’t work too, so i removed the last \b then i was back on track. :)

    There was no space between the str and the \b in my example. In my testing, I literally used \bnstr\b and it worked. If you used \bnstr \b, it would not work, because the next character after the space is a " , and between the space and the quote mark is not a word-boundary.

    But i had some other problems with the file to deal with first, …

    Glad you figured it out.

  • start and end issues

    6
    0 Votes
    6 Posts
    819 Views
    mkupperM

    @PeterJones I think the OP has disappeared but a tool that will go through the list of possible startup locations like those you mentioned is Autoruns from Microsoft’s Sysinternals team.

    Autoruns is mildly clunky but works. You start it, ideally as an administrator, and watch the status line in the lower left corner. Once it’s done scanning it’ll say “Ready.” Type Noptepad++ and you will see the various places in Windows that are set up to start or run Notepad++. There is a checkbox on the left side that you can use to disable entries.

    Autoruns is handy as it both seems to be a complete check of the various ways an application could get started and the enable/disable checkboxes allow you to easily re-enable something meaning a person can disable/enable blocks of things that could be causing the problem they are trying to track down.

  • Delete blank lines inside ""

    13
    0 Votes
    13 Posts
    885 Views
    Alan KilbornA

    @Channel-Number-1

    You have presented a detailed non-Notepad++ solution to a problem. This is frowned upon here as off-topic. Please try to confine discussion to Notepad++ solutions, or quickly point a poster to other types of solutions without going into detail.

  • Need help with custom sort operations

    29
    0 Votes
    29 Posts
    8k Views
    Dean-CorsoD

    @Mark-Olson

    Thank you very much Mark. Works.

  • Search failing

    5
    0 Votes
    5 Posts
    375 Views
    Mark OlsonM

    FYI, see here for more on characters that will need to be escaped in Regular Expressions mode.

  • Syntax Highlighting Not Working At All

    2
    0 Votes
    2 Posts
    6k Views
    PeterJonesP

    @Patrick-Skelton said in Syntax Highlighting Not Working At All:

    Can someone please point me at where I may have done this, 'cos my memory is failing me…again?

    You probably went to Settings > Style Configurator > Default Styles > Global Override and did one or more of ☑ Enable global foreground colour, ☑ Enable global background colour, and maybe some of the other Enables on that tab as well.

    Turn those off, then read the User Manual section “Global Styles” to learn about the difference between Global Override and Default Style, and why use of Global Override should be rare.

    (It doesn’t help that the default Style selection in the Style Configurator is the Global Override, which tricks users into thinking that it’s the best solution to changing the default color.)

  • Refresh/review button

    6
    0 Votes
    6 Posts
    1k Views
    Khal RashidK

    @Terry-R Hi Terry,
    I took your earlier advice and left NP++ in original state. And today, lo-and-behold I can preview my work without having to make changes.
    Thank you for your advice.
    Khal

  • HELP!!! Multiple context menu entries

    11
    0 Votes
    11 Posts
    3k Views
    Nandini CDN

    @Victorel-Petrovich Thank you for sharing this. I uninstalled the current version and downloaded the latest version and This fixed both the issues.

  • different plugins for different unprivileged users w/ one install?

    13
    0 Votes
    13 Posts
    4k Views
  • Convert quote marks straight to curly on html pages

    5
    0 Votes
    5 Posts
    3k Views
    Dazel andpointcomD

    Haha! Thank you for the detailed answers. I was hoping for a simpler solution than regex, as I understand very little about it. However, it went surprisingly well…

    It’s very basic, not 100% accurate solution but close enough. I edited by hand the dozen that were left next to a HTML tag (<a>, <li>, <i>).
    I’ll leave it there in case somebody else has the same need in the future:

    Step 0: Make backup!

    Step 1:
    \s" replaced by \s“ (catches all opening quotes after a space, so no HTML “code” should be hit, and replaces them)

    Step 2:
    “([^“]*)” replaced by “\1” (replaces closing quotes)

    I use the French version:

    Step 1:
    \s" replaced by \s« 

    Step 2:
    «([^“]*)” replaced by «\1 »

    And for the apostrophes:
    ([a-zA-Z]|[à-ü]|[À-Ü])'([a-zA-Z]|[à-ü]|[À-Ü]) replaced by \1’\2 (every apostrophe between two letters, to avoid hitting things in javascript, accented letters included for French)
    Then by hand, I replaced the few that were left (no regex):
    '<i> --> ’<i>
    '<a --> ’<a

    @ Mark Olson
    No idea what a parser is, nor XML… Anyway my typography is saved now.

  • 0 Votes
    4 Posts
    495 Views
    OpossumPetyaO

    so I ran the “scan disk” (which is chkdisk), it reported no errors, but now it works as it did originally. wow

    anyways, thank you @PeterJones , looks like I’m all good for now.

    P.S. btw sorry I didn’t mention in the original msg, I’m using stdin/stdout mode with my tool, just to complete the picture.

  • Adding a vertical column to the right side

    4
    0 Votes
    4 Posts
    2k Views
    PeterJonesP

    @MachineThatGoesP1NG ,

    maybe there was some sort template that i could apply to text files.

    Notepad++ doesn’t have a builtin templating system. I use the QuickText plugin, available through Plugins Admin. Then, in the QuickText settings, I would pick the right language (if you’re using a UDL instead of a builtin language, I think you pick “External” from the dropdown, but I’ve never tried that). You can then define a new quick-text keyword, and then in your document, you’d use type the quick-text keyword then use the assigned keystroke for QuickText completion (I think TAB is the default; I change mine to Ctrl+Shift+Enter, because TAB has too many important meanings to me to be also used for this function).

    In the languages that I use, I have a QuickText entry called “start”, so I would type start then the keystroke (or Plugins > QuickText > Replace Snip), and get my starter template.

    But I’m guessing what you really want is “I want to be able to take my existing code and add the column easily”. Since macros don’t know how many lines are in your file, if I were doing it for me, I would be tempted to pull out the PythonScript plugin, and code up something that would add the veritcal-bar comments to all the lines in the file.

    with shift tab to push them back

    Shift+Tab works for shifting the first non-space characters of a file back one tab-stop (honoring your language’s tab settings for using either n spaces or the actual tab character). But for something that’s later on the line, I would again just recommend using the column-mode editing (either via Alt+Click as I said before, or using Edit > Begin/End Select in Column Mode for long files – use that once to set it at the beginning, then Ctrl+End to get to the end of the document, move the caret to the right column of the last line, and use it again to end the selection) and then delete that selection to move it left (or do one or more TABs or spaces to move right)

  • Remove duplicate lines not possible?

    24
    0 Votes
    24 Posts
    6k Views
    Alan KilbornA

    @endolith said in Remove duplicate lines not possible?:

    It depends on the text?

    Could be a line-ending problem?
    If line-endings are different on otherwise duplicate lines, they won’t be considered true duplicates.

  • notepad++ editing and searching

    2
    0 Votes
    2 Posts
    242 Views
    Mark OlsonM

    @Gen-Gen
    If none of your passwords or the domain names to which they correspond contain a colon (literal :), this is an easy find-replace:
    FIND: .+:([^:]{8,15})$
    REPLACE WITH: ${1}
    Regular expression ON.
    Example:
    Converted

    PYUTGPBQzTM@LZsJeXV.pDNTx:IBge1O9h 8Ej4Yvadj4m.NJr:DqSyjWpm bN6wc76fo4n@YYyqy.USPao:vcoT7KF584g OMm7PAVs9iy4.xTCQ:Sz4iAC02 qH7BVQxhor.jwxZ:6Oyb8nuPjW lKgyhCKKu@flBQpAB.rRXmG:2o9mtT9boc8bg0 G41wuU.VIT:Q4TDoVqIe5o3I gGNBYv8abkJ.rlev:YA9duaEwmG G3nVFy@repHcft.RfhM:N70Gnr6YcYIm hr9Fa8YnJHG1@MjZKlEo.NGxF:qZYmosMf7KFnq KuhwiopHHu.BpLR:YUqNT0dLBX MenK6RKfL@JzcbtFd.Qelr:sXSRBOg0q MskMswpfCsZa.cJBX:dISQwNJn2EIo ayx3xXUw4f@mOHliOF.GTrIo:HpEigj5In0 msGP447Um@KplNWkgB.LsfJ:oM2ZdFe8P GtSojZe8.ZBQJ:UzbBJdos8I2e MMUkZ3EX@apVKI.FEUK:vf1fG2bmHeYtbFT RPxo3RX8sdH@RIQGxFPXMh.HfS:b6d8qOSNkq u1OuDyumF2W.DmAR:40FyTgDi5PFTal4 nQBU7X@xAXZgvN.YIpr:CduOg6J83gI

    into the stuff after the colon, i.e

    IBge1O9h DqSyjWpm vcoT7KF584g Sz4iAC02 6Oyb8nuPjW 2o9mtT9boc8bg0 Q4TDoVqIe5o3I YA9duaEwmG N70Gnr6YcYIm qZYmosMf7KFnq YUqNT0dLBX sXSRBOg0q dISQwNJn2EIo HpEigj5In0 oM2ZdFe8P UzbBJdos8I2e vf1fG2bmHeYtbFT b6d8qOSNkq 40FyTgDi5PFTal4 CduOg6J83gI

    If any passwords or domain names contain a colon, this becomes much more irritating, and I’d have to give it a good think.

    FWIW this task becomes trivial if you used a horizontal tab (as in, the character from the Tab key) to separate passwords from domain names, because horizontal tabs are never allowed in passwords or URLs.