Using Rich-Text Copy in IntelliJ IDEA 14.1

IntelliJ IDEA 14 added built-in support (without additional plugins required) for copying text to external rich-text editors such as MS Word, OpenOffice Writer, Gmail, etc. allowing for preserving formatting.

IntelliJ IDEA 14.1 makes it more flexible, allowing you to choose when to use this feature. You can choose to enable this behaviour by default when using the standard Copy action. All that’s need is to enable the following checkbox in Settings:

richTextCopy

With this enabled, if you want the old behaviour of standard copy (i.e. with no additional formatting)
you can use a separate action (Copy as Plain Text or Copy as Rich Text) from the Edit Menu entry or the editor’s context menu:

copyAsAction

These actions do not have default shortcuts assigned, but you define them in Keymap settings if you find yourselves using one of them often.

Try this and other enhancements by downloading IntelliJ IDEA 14.1 EAP build. Share your feedback on the discussion forum and in our issue tracker. Thanks!

This entry was posted in EAP Releases, New Features, Tips & Tricks and tagged , . Bookmark the permalink.

4 Responses to Using Rich-Text Copy in IntelliJ IDEA 14.1

  1. I love this feature! It makes for professional snippets inside of emails.

    Thank you!

  2. E. Sundin says:

    Awesome! I’m using the Dracula theme but need the rtf copies with white background. Luckily you can set the copy color scheme with IntelliJ 😀

  3. cairns solar says:

    But a smiling visitor here to share the love , btw outstanding layout.

  4. I noticed the change at some time and always pasted unformatted and didn’t understand why IDEA does it by default. Today I got really angry when formatted code pasted to a chat (Skype for business in this case) and then copied by a colleague to IDEA refused to work although seemingly perfect. The trouble is that all spaces were switched to U+00a0 (nbsp). But this blogpost was helpful – I turned it off and I can use explicit copy as rich text anytime I really need it. I have never needed it so far though, because any formatting is done by something else (e.g. javascript syntax highlighting) and – as explained – it made any code copy/pasted from/to IDEA through “incomaptible” tool unusable (although visually flawless :-)).

Leave a Reply

Your email address will not be published. Required fields are marked *