This has been been one of my absolute largest headaches working OSX into my daily workflow. I use Evernote constantly. And by constantly I mean I keep it all in there. I have cooking stuff. Toddler stuff. Beer. Wine. School. ToDo lists. And that’s just the “Personal” stack. If there’s something I don’t want to forget, I paste it in there.
Problem is when you do a lot of CLI work on servers, cutting/pasting in and out of evernote doesn’t always work as you’d expect…which can lead to possibly bad consequences. Luckily it can be worked around!
First is pasting INTO Evernote. Here’s a good example from a class I took. my shell on OSX is black with green foreground. When you copy and paste from this it keeps the formatting in Evernote:
Argh. Over time this gets wacky if you are pulling from websites….windows prompts…etc. (side note: that for loop is super useful for restarting all Puppet services..)
However there is a simple way to avoid it. I found recently you can do SHIFT-CMD-V instead of just CMD-V to paste without formatting. Brilliant! Works the same with font sizes and faces too.
Now that’s awesome and all, but that doesn’t solve my other annoyance. Dashes and quotes! Working in IT I’m constantly doing stuff at the command line of servers. Lots of times arguments and flags are passed to commands via dashes (– or -) and “double quotes” or ‘single quotes’ etc. You would think all would be well, but oh no no.
A lot of times I’ll have a block of text with a lot of these quotes and dashes. A simple example:
<!--?xml version="1.0" encoding="UTF-8" standalone="no"?--> <strong>login --serverUrl https://blah.corp.local:8443/darwin --username "email@example.com" --password blah</strong>
Paste that into evernote, later pull it out and the server yells back at you OH NO YOU DONT. DENIED! Looking closer I pasted:
<!--?xml version="1.0" encoding="UTF-8" standalone="no"?--> <strong>login -serverUrl https://blah.corp.local:8443/darwin -username `firstname.lastname@example.org` -password blah</strong>
Because it tried to be helpful and converted characters on you. Imagine a large block of text and the manual editing that would require. Let alone troubleshooting.
Avoid it all together by turning it off in the OSX settings: System Preferences -> Keyboard -> Text, uncheck “Use smart quotes and dashes”. BOOM. No more.
Hope that saves someone some headache. Partial credit source given here.