在intelliji IDEA中将语法颜色的代码块复制为rtf? [英] Copy syntax-coloured code block as rtf in intelliji IDEA?

查看:438
本文介绍了在intelliji IDEA中将语法颜色的代码块复制为rtf?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有一种简单的方法可以将语法颜色的代码块复制为intellij IDEA中的rtf?

Is there a simple way to copy syntax-coloured code block as rtf in intellij IDEA?

推荐答案

更新:现在有一个新的插件:'复制'类固醇由JetBrains维护。

UPDATE: there is now a new plug-in for this: 'Copy' on steroids that is maintained by JetBrains.

无法直接从IDEA复制彩色代码块。

There is no way to copy colored code block from IDEA directly.

解决方法是使用文件|导出为HTML ,然后在浏览器中打开HTML,然后从浏览器窗口复制并粘贴到Wordpad或MS Word中。

A workaround is to use File | Export to HTML, then open HTML in a browser, then copy from the browser window and paste into Wordpad or MS Word.

另一种更快的方法是在设置中安装复制为HTML 插件插件

Another and more faster way is to install the Copy as HTML plug-in in Settings | Plugins:


将一段代码复制为html

Copies a snippet of code as html


  • 将菜单项Copy as HTML添加到主菜单和编辑器弹出窗口。将复制当前选择或完整的编辑器缓冲区。目前仅在焦点位于编辑器中时才起作用(例如,在项目树中不起作用)。

  • 保留比内置HTML导出更多的格式。

  • HTML只是一个片段(没有html和body标签),意味着要插入到完整的HTML文档中。

  • 目前HTML格式是固定的,并且使用了很多CSS。

  • 选项:unindent,添加边框,填充,行号,空格转换选项卡,包括编辑器警告和错误突出显示(请参阅IDE设置 - >复制为HTML)。

  • 重复使用编辑器显示行号设置(请参阅Idea的查看菜单)。

  • Adds menu items "Copy as HTML" to main menu and editor popup. Will copy the current selection or the complete editor buffer. Currently only works if focus is in editor (for example won't work in project tree).
  • Preserves more formatting than the built-in HTML export.
  • HTML is only a snippet (without html and body tags) meant to be inserted into a complete HTML document.
  • Currently HTML format is fixed and uses CSS a lot.
  • Options: unindent, add border, padding, line numbers, tabs to spaces conversion, include editor's warning and error highlighting (see IDE Settings -> Copy as HTML).
  • Reuses the editor "Show Line Numbers" setting (see Idea's "View" menu).

这篇关于在intelliji IDEA中将语法颜色的代码块复制为rtf?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆