Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.
68

You can use OptionShift⌘-V to paste and match the current style. This removes all previous formatting, links, etc. If you would like to make this the default action when pressing ⌘V, open System Preferences -> Keyboard -> Keyboard Shortcuts, and select Application Shortcuts from the list on the left. Then, hit + to make a new shortcut, select ...


57

You can disable copy/pasting the formatting from Terminal by changing the com.apple.Terminal preferences file. Open Terminal on your Mac and enter the following command: defaults write com.apple.Terminal CopyAttributesProfile com.apple.Terminal.no-attributes This will strip all text attributes out of copy/pasting from Terminal


43

Based on this post, the following worked for me. Check if the pboard daemon is running: launchctl list | grep com.apple.pboard If the pboard daemon is running, then stop and start it. If it's not running, start it: launchctl stop com.apple.pboard launchctl start com.apple.pboard Then, you may need to restart the application(s) where cut-and-paste is ...


39

You should be able to do this by holding the option key down while doing it. This changes the cursor to a '+' sign and allows you to select any rectangular area of text. See screenshot below: If you look at the above image closely, you'll see in the left window I've highlighted a block of text in Terminal and in the right window I've been able to paste ...


38

It's not by default. If you have installed Guest Additions, then you can do this: Start the VM Go to Machine > Settings in the file menu. Go to the General tab, then Advanced. Set the Shared Clipboard setting to Disabled, Guest to Host, Host to Guest or Bidirectional.


28

I use cp -Rfv sourcefile destinationfile with success on a pretty regular basis. cp = copy R = maintains file hierarchies f = if an existing destination file cannot be opened, remove it and try again v = verbose mode, displays files transferred as it progresses sourcefile = data you want to copy destinationfile = directory/drive you want to copy to


25

You can push plain text to the clipboard by piping to pbcopy, to paste anywhere as usual. man ssh | col -b | pbcopy or equivalent man -P "col -b | pbcopy" ssh the latter of which is nicer if you want to use it as an alias, like mancp ssh, given: alias mancp='man -P "col -b | pbcopy"' There are methods to go to HTML/PDF: Can man pages be converted to ...


23

Try Gnu ddrescue -- it's a data recovery program that does block-based copying with corrupt data recovery during the copy operations. You can get it for OS X if you're using Homebrew by typing in an Terminal window: brew install ddrescue A guide on arstechnica describes how to rescue a failed disk using ddrescue. Make sure you read through the guide, as it ...


21

This is a classic use case for rsync: rsync -av /source-path/source-dir /destination-path rsync will copy only new and changed files to the new location. It is important to understand how a trailing slash on the source argument functions. If there is a trailing slash then the contents of /source-path/source-dir will be copied to destination-path. If ...


20

Whenever I have this problem it's because I've accidentally turned mouse keys on. (Option + 5) This is only the case if you have a keyboard without a numpad though.


19

Notes Notes.app in OS X 10.10 can do all you request: Font colour, size, and family can be set through the Format menu. Substitutions and smart quote behaviour are managed through the Edit > Substitutions sub-menu. Beyond Notes: Text Wrangler If you need more than Notes.app offers, try Text Wrangler from Bare Bones.


19

Apple used custom code called "Demo Monkey" whose source code is available on GitHub.


14

Just use 'Paste Matching Style' Which will keep the formatting as the same as the insertion point So instead off: You would get:


14

Open your terminal (Terminal.app) Then do: mv source_folder destination_folder e.g: mv /Users/foo/Music/ /Users/foo/something This is way faster than copying as it maintains inode


14

No security for data that is in one of the system clipboards is possible by design. The macOS clipboard is a public billboard open to all processes. Clipboard is the mechanism to let all apps read / modify shared data. Either restrict your set of apps installed to those you trust with the data or don't ever copy sensitive content into the clipboard for ...


13

The way URL opening in Mac OS X is actually more complicated than you would think. When you click a URL, Mac OS X does not just pass the browser the URL to open; instead, it sends it an Apple Event, with the ID kAEGetURL, containing the URL. I never really used Automator (it's just way too slow and limited for my typical use), so I'm not sure about this, ...


13

To set a combination of keys to clear the clipboard, you can create a Service using Automator. Your service will have a single action, Run Shell Script The shell script you will use is this: pbcopy </dev/null Then save the service and assign it a keystroke using System Preferences » Keyboard » Keyboard Shortcuts » Services. The challenge of an ...


13

There are various modes of sleep a Mac can go into. At this point your question only describes the fact your laptop screen goes to sleep, but this is different from your computer actually going to sleep. Regardless of your settings and assuming your MacBook Pro has a continuous power source, then a system event such as copying a large amount of data will ...


13

If you want to read the man page in Preview, nicely formatted as a PDF, you can run man -t ssh | open -f -a Preview Or man ssh | col -b | open -f -e to open the text version in TextEdit.


13

When using iTerm2, you can either use Cmd+Option+mouse to perform vertical/block selection, which transforms your cursor into a cross, similar to Terminal.app. Or you can use copy mode: Cmd+Shift+C to enter copy mode Ctrl+v to enter vertical/block mode Move the cursor using the cursor keys on the keyboard (see link for more movement options) Once you’re ...


13

The shell snippet pbpaste | tr -cd "[:digit:]+" | pbcopy will take the content of the clipboard, remove all non-digits and put the result back into the clipboard.


12

A normal copy (or copy via rsync or ditto) will not replicate a Time Machine fully as it will convert two directories linked together (as occurs in successive TM backups with no change between) into two separate directories. The best way is to copy the whole the disk using Disk Utility or the block copy part of Carbon Copy Cloner and probably similar on ...


12

You could do it with Automator like this: Create new: Services Services receives no input in any application Use the search to find and add action: Run Applescript Copy and paste the following to the field on the right: tell application "System Events" set _Date to (current date) keystroke ¬ (year of _Date as text) & "_" & ¬ ...


11

You should try to make sure the process rdpclip.exe is running in your Windows 7 box. If it is, try killing it and restarting it. This process transfers the clipboard contents over RDP.


11

You can use option + command + V for moving a file or folder to destination folder after copy it using command + C.


11

Most people I know set the paste shortcut to invoke paste and match style. Here is the command to change: You can paste with style when you really want it, but for me 95% of the time I don’t want the style and only the raw text. Open System Preferences Select Keyboard Go to the Shortcuts tab Select App Shortcuts Select the + button Type Paste and Match ...


10

Try ls | pbcopy tmp=$(pbpaste) And don't forget to remove the files called pbcopy and something you created with your first and second line.


10

You might also try using awk to limit the shell output to what you want. You could then even pipe it to pbcopy


9

I really like Flycut. Available here: https://github.com/TermiT/Flycut Like all of the other answers here, it's a clipboard manager which stores every item you copy using ⌘+c in a list. Then you can press ⌘+shift+v to see a list of the items you have copied and choose one to paste. Unlike the other answers here, it's free, open source, and doesn't come ...


Only top voted, non community-wiki answers of a minimum length are eligible