Skip to main content
Added the Mac solution; added 2 characters in body
Source Link
R.K.
  • 1.4k
  • 12
  • 24

On Windows:

You could use Notepad++ to achieve the desired effect.

  1. Open the source file in Notepad++.
  2. Highlight the text you want to copy.
  3. Right click and select Plugin commands > Copy Text with Syntax Highlighting
  4. Paste the text into Gmail.

On OS X:

TextMate has a copy-as-RTF that people are raving about. They use it to paste code with syntax highlighting on KeyNote.

From their GitHub page:

Need to copy + paste some text and keep the syntax highlighting? Yes you do. All the time. For Keynote presentations. And probably other reasons. Install this bundle, and after selecting some pretty syntax highlighted text, use Ctrl+Alt+Cmd+R to copy it as RTF (rich text format) Now you can paste it directly into Keynote presentations. And other places where RTF is supported. 

Should work on Gmail's composer too.

You could use Notepad++ to achieve the desired effect.

  1. Open the source file in Notepad++.
  2. Highlight the text you want to copy.
  3. Right click and select Plugin commands > Copy Text with Syntax Highlighting
  4. Paste the text into Gmail.

On Windows:

You could use Notepad++ to achieve the desired effect.

  1. Open the source file in Notepad++.
  2. Highlight the text you want to copy.
  3. Right click and select Plugin commands > Copy Text with Syntax Highlighting
  4. Paste the text into Gmail.

On OS X:

TextMate has a copy-as-RTF that people are raving about. They use it to paste code with syntax highlighting on KeyNote.

From their GitHub page:

Need to copy + paste some text and keep the syntax highlighting? Yes you do. All the time. For Keynote presentations. And probably other reasons. Install this bundle, and after selecting some pretty syntax highlighted text, use Ctrl+Alt+Cmd+R to copy it as RTF (rich text format) Now you can paste it directly into Keynote presentations. And other places where RTF is supported. 

Should work on Gmail's composer too.

deleted 3 characters in body
Source Link
Lipis
  • 9.8k
  • 1
  • 36
  • 43

You could use Notepad++ to achieve the desired effect.

  1. Open the source file in Notepad++.

    Open the source file in Notepad++.
  2. Highlight the text you want to copy.

    Highlight the text you want to copy.
  3. Right click and select Plugin commands > Copy Text with Syntax Highlighting

    Right click and select Plugin commands > Copy Text with Syntax Highlighting
  4. Paste the text into Gmail.

    Paste the text into Gmail.

You could use Notepad++ to achieve the desired effect.

  1. Open the source file in Notepad++.

  2. Highlight the text you want to copy.

  3. Right click and select Plugin commands > Copy Text with Syntax Highlighting

  4. Paste the text into Gmail.

You could use Notepad++ to achieve the desired effect.

  1. Open the source file in Notepad++.
  2. Highlight the text you want to copy.
  3. Right click and select Plugin commands > Copy Text with Syntax Highlighting
  4. Paste the text into Gmail.
Source Link
R.K.
  • 1.4k
  • 12
  • 24

You could use Notepad++ to achieve the desired effect.

  1. Open the source file in Notepad++.

  2. Highlight the text you want to copy.

  3. Right click and select Plugin commands > Copy Text with Syntax Highlighting

  4. Paste the text into Gmail.