Home Forums Chat Forum Notepad ++ question

Viewing 33 posts - 1 through 33 (of 33 total)
  • Notepad ++ question
  • ebygomm
    Free Member

    Does anyone have any ideas of how I can get Notepad++ to distinguish between hyphens (char 45) and en-dashes (char 8211). At the moment they are displayed identically.

    jimdubleyou
    Full Member

    I don’t think you can do much with the standard set of view options.

    You might be able to create a custom style that changes the colour / highlight?

    Our version is a locked down package so I can’t even change the colour scheme 🙁

    Edit: there is an ascii converter in the plugin menu, not that helpful if you’re checking loads of characters though…

    joshvegas
    Free Member

    I think you might need to make your own language style.

    Aka a copy of whatever language you are coding in then edit that for that ine tweak.

    sirromj
    Full Member

    Just fired up the VM to run Windows, new version of NP++ available, downloaded & installed.

    Hyphens and en/em dashes displayed properly here.
    20200701-115034

    ebygomm
    Free Member

    Is that v7.8.8?

    I’m on v7.8.3 which I didn’t think was that old, but I’ll try an update first then

    And what font are you using?

    GrahamS
    Full Member

    It entirely depends on the font you use.

    Default is “Courier New” which is mono-spaced so not a lot of room to show different dash lengths.
    “Consolas” is also mono-spaced but manages to make the difference a little more obvious.

    If you try a normally kerned non-monospace font like “Arial” or “Gill Sans MT” then the difference is very obvious, but most people prefer mono-space in text editors.

    ebygomm
    Free Member

    It’s interesting actually, because on my home laptop i can see the difference between the different dashes using Courier New but on my work laptop hyphens and en-dashes are not distinguishable from one another, but this is also set to Courier New – hmmm

    GrahamS
    Full Member

    That is odd. Are both systems Win10?
    Maybe there are subtle differences in the version of the Courier New font installed?

    scuttler
    Full Member

    Dunno but worth reminding ourselves of the momentous events of May 2018.

    Introducing extended line endings support in Notepad

    ebygomm
    Free Member

    No, my work laptop is windows 7 (!!! less said about that the better) so perhaps that’s the crucial difference

    Cougar
    Full Member

    Dunno but worth reminding ourselves of the momentous events of May 2018.

    … which was all well and good until you save the config files back out and Linux shits the bed.

    Cougar
    Full Member

    my work laptop is windows 7 (!!! less said about that the better)

    This is the sort of preamble which ends with “and then we got hit with ransomware which took out the entire company for six weeks and no-one can explain how it happened.”

    I loved Windows 7, it was one of the best OSes MS has come up with in decades. But it is months beyond End of Life now and is a massive security risk. It was superseded by W8 eight years ago, this shouldn’t have come as a shock to your IT bods. There is zero reason for your average end user to still be using it today other than in exceptional circumstances.

    scuttler
    Full Member

    until you save the config files back out and Linux shits the bed

    So Linux is officially shit then. 😉

    What seems like a bazillion years ago I used to get paid to promote the benefits of mechanisms designed to exchange data between UNIX and Windows and frankly it never got much more complex than the config options associated with what to do with CRLF.

    ebygomm
    Free Member

    Perhaps better not to mention who I’m currently working for 🙂

    Cougar
    Full Member

    So Linux is officially shit then. 😉

    Heh.

    I guess it’s kinda like putting diesel into a petrol tank. It’s not really the ‘fault’ of petrol or diesel engines, just different systems.

    GrahamS
    Full Member

    Dunno but worth reminding ourselves of the momentous events of May 2018.

    OP is talking about Notepad++ (which is actually a pretty decent text editor) not bog standard Windows Notepad. But I did laugh when I read the incredible update to Windows Notepad in the May 2020 Windows 10 update:

    Notepad newness. The beloved 30-year-old text editor has some small but mighty improvements. There’s now wrap around find/replace, quick text zooming, and when you see an asterisk in the title bar you’ll know you have unsaved changes.

    Groundbreaking. What will they think of next eh?

    scuttler
    Full Member

    OP is talking about Notepad++

    Totally get it but (and also with your post on further developments) I just find it amusing that the organisation that brought enterprise email infrastructure for megacorps, Azure, the rapacious Office 365 and god knows what else, still struggles with a text editor.

    As an aside Paint 3D is an upgrade from Paint (unless you’re Jim’ll Paint It).

    ebygomm
    Free Member

    It’s MS Office that’s the root cause of me needing to be able to spot the differences, ‘helpfully’ changing hyphens to en-dashes

    GrahamS
    Full Member

    It is kinda bizarre that Windows Notepad (and Paint) are still so bad. Maybe the thought is that they are as simple as possible for numpty users because anyone who really cares will install their own?

    Unfortunately that doesn’t work quite so well when, for example, I’m constantly spinning up clean VMs for dev/testing work and have to use the default tools on them.

    tomnavman
    Free Member

    Windows Notepad is great – Notepad ++ is also great, they have different uses!

    If want to quickly strip all formatting from a string of text nothing beats standard Notepad

    GrahamS
    Full Member

    If want to quickly strip all formatting from a string of text nothing beats standard Notepad

    Right click -> Paste as plain text (or Ctrl+Shift+V)

    Cougar
    Full Member

    It is kinda bizarre that Windows Notepad (and Paint) are still so bad.

    Paint is dead.

    Notepad, yeah, I guess there’s just little reason to drive development of it. It’s a quick-n-dirty editor that opens instantly and at that it excels. If you want more functionality then there’s OneNote and sticky notes and a host of third party options. I’d be less surprised if they just quietly removed it and went “use something else” rather than update it hugely.

    It’s MS Office that’s the root cause of me needing to be able to spot the differences, ‘helpfully’ changing hyphens to en-dashes

    What on earth use case do you have where that difference is important and someone thought that Word was the correct tool for the job?

    Anyroad, search and replace in N++ is pretty powerful, you can run it against entire folders IIRC.

    Cougar
    Full Member

    Right click -> Paste as plain text (or Ctrl+Shift+V)

    Or if you forget, in Office apps you get a format box when you paste. Tap (not hold) Ctrl and then press T and it’ll strip the formatting.

    ebygomm
    Free Member

    Outlook is the culprit not word! Why organisations create filepaths that include ‘word – word’ type structures is perhaps the real question! When the unwary then put them in emails they then become invalid filepaths 🙂

    I was looking at a logfile in notepad and couldn’t understand why something wasn’t working when the filepath looked exactly right.

    scuttler
    Full Member

    Paint is dead.

    No it isn’t https://jimllpaintit.tumblr.com/

    Optimus Amazon Prime

    FuzzyWuzzy
    Full Member

    Anyroad, search and replace in N++ is pretty powerful, you can run it against entire folders IIRC.

    Funnily enough I spent several days last week doing that, had to redact thousands of log files (~15GB total) before sending on to vendor support. I just need to automate it for next time so I can give it a CSV of replacements and just point it at a folder.

    Cougar
    Full Member

    Paint is dead.

    No it isn’t

    I really should check more before I post.

    You’re right, I was working from out of date info. MS announced they were going to kill it and then backtracked. It’s merely “deprecated” now as far as I can gather.

    Cougar
    Full Member

    Outlook is the culprit not word! Why organisations create filepaths that include ‘word – word’ type structures is perhaps the real question! When the unwary then put them in emails they then become invalid filepaths

    It’s a complete guess and I’d have to try it to be certain, but is that an issue perhaps with folk manually typing out filepaths rather than C&Ping them from Explorer?

    ebygomm
    Free Member

    Yes, i don’t know quite why you would type them out instead of C&P. I stopped trying to understand some people’s thought processes a long time ago. I once had someone take a screen print, print it out and then use the photocopier to scan and email back to me!

    whitestone
    Free Member

    Years ago someone emailed me a quick patch to some code except that it broke the compilation. There was nothing obviously wrong with the code but the compiler error just didn’t make any sense whatsoever.

    A morning’s work eventually discovered the reason. Like most big companies we used Outlook for email and that used Word, or a version of it, as its default editor. Word had “helpfully” converted some of the space characters in the code to its own internal non breaking space character. The code editor we used would display that character as a space not a special character so I was trying to see the difference between a space and a space! Grrr!


    @Cougar
    – a lot of people don’t realise just what you can C&P on modern systems or even what the highlighting means when you click in the browser/explorer address bar.


    @ebygomm
    – the first place I worked after college had a bizarre timekeeping system. There was a preformatted Excel worksheet into which you entered your project codes and times and then emailed to the secretaries. They would then print them off and manually re-enter the data into another system.

    tomnavman
    Free Member

    @ebygomm – the first place I worked after college had a bizarre timekeeping system. There was a preformatted Excel worksheet into which you entered your project codes and times and then emailed to the secretaries. They would then print them off and manually re-enter the data into another system.

    Embarrassingly our Finance team still do exactly this for expenses… and I work for a tech company.

    ebygomm
    Free Member

    @whitestone I’ve already had fun this week playing spot the difference between spaces and non breaking spaces and the micro symbol and lowercase Greek mu

    I’ve written some python to help me out now 🙂

    Greybeard
    Free Member

    MS Office… … ‘helpfully’ changing hyphens to en-dashes

    You can turn that behaviour off in Autocorrect > Autoformat. Not the obvious place to look, as swapping characters isn’t what I think of as formatting.

Viewing 33 posts - 1 through 33 (of 33 total)

The topic ‘Notepad ++ question’ is closed to new replies.