Notepad ++ question
 

  You don't need to be an 'investor' to invest in Singletrack: 6 days left: 95% of target - Find out more

[Closed] Notepad ++ question

32 Posts
11 Users
0 Reactions
418 Views
Posts: 0
Free Member
Topic starter
 

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.


 
Posted : 01/07/2020 11:21 am
Posts: 7169
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...


 
Posted : 01/07/2020 11:30 am
Posts: 12507
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.


 
Posted : 01/07/2020 11:42 am
Posts: 8771
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


 
Posted : 01/07/2020 11:49 am
Posts: 0
Free Member
Topic starter
 

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?


 
Posted : 01/07/2020 12:04 pm
Posts: 31206
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.


 
Posted : 01/07/2020 12:51 pm
Posts: 0
Free Member
Topic starter
 

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


 
Posted : 01/07/2020 1:01 pm
Posts: 31206
Full Member
 

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


 
Posted : 01/07/2020 1:29 pm
Posts: 6874
Full Member
 

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

https://devblogs.microsoft.com/commandline/extended-eol-in-notepad/


 
Posted : 01/07/2020 1:40 pm
Posts: 0
Free Member
Topic starter
 

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


 
Posted : 01/07/2020 1:46 pm
Posts: 77347
Free 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.


 
Posted : 01/07/2020 2:34 pm
Posts: 77347
Free 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.


 
Posted : 01/07/2020 2:40 pm
Posts: 6874
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.


 
Posted : 01/07/2020 2:46 pm
Posts: 0
Free Member
Topic starter
 

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


 
Posted : 01/07/2020 3:02 pm
Posts: 77347
Free 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.


 
Posted : 01/07/2020 3:59 pm
Posts: 31206
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?


 
Posted : 01/07/2020 4:07 pm
Posts: 6874
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).


 
Posted : 01/07/2020 4:21 pm
Posts: 0
Free Member
Topic starter
 

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


 
Posted : 01/07/2020 4:28 pm
Posts: 31206
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.


 
Posted : 01/07/2020 4:31 pm
Posts: 428
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


 
Posted : 01/07/2020 4:44 pm
Posts: 31206
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)


 
Posted : 01/07/2020 5:14 pm
Posts: 77347
Free 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.


 
Posted : 01/07/2020 5:26 pm
Posts: 77347
Free 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.


 
Posted : 01/07/2020 5:29 pm
Posts: 0
Free Member
Topic starter
 

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.


 
Posted : 01/07/2020 5:38 pm
Posts: 6874
Full Member
 

Paint is dead.

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

Optimus Amazon Prime


 
Posted : 01/07/2020 6:04 pm
Posts: 8613
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.


 
Posted : 01/07/2020 6:41 pm
Posts: 77347
Free 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.


 
Posted : 01/07/2020 7:30 pm
Posts: 77347
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

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?


 
Posted : 01/07/2020 7:32 pm
Posts: 0
Free Member
Topic starter
 

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!


 
Posted : 01/07/2020 7:51 pm
Posts: 0
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.


 
Posted : 02/07/2020 7:44 am
Posts: 428
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.


 
Posted : 02/07/2020 8:24 am
Posts: 0
Free Member
Topic starter
 

@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 🙂


 
Posted : 02/07/2020 10:39 am
Posts: 4170
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.


 
Posted : 02/07/2020 12:12 pm

6 DAYS LEFT
We are currently at 95% of our target!