android studio 复制代码,Android Studio:使用语法突出显示复制文本(Android Studio: Copy text with syntax highlighting)...

Android Studio:使用语法突出显示复制文本(Android Studio: Copy text with syntax highlighting)

我正在使用Android Studio V1.1编写程序,我想将我的代码复制到MS Word 2013文档中。 当我复制代码时,它只是Word中的黑色。

有没有办法用语法高亮复制文本? 我将代码复制到Notepad ++中,并且有“使用语法突出显示复制文本”选项,但我看起来并不像Android Studio那样好。

如果有人能告诉我一个解决方案,那就太棒了。 谢谢!

I am writing a programm with Android Studio V1.1 and I want to copy my code into a MS Word 2013 document. When I copy the code its just black in Word.

Is there a way to copy the text with syntax highlighting? I copied the code into Notepad++ and there is this "Copy Text with Syntax Highlighting" option but I that doesnt look as good as in Android Studio.

It would be great if someone could tell me a solution. Thanks!

原文:https://stackoverflow.com/questions/29035676

2019-12-31 00:47

满意答案

只要MS Word 2013不支持代码的语法突出显示,您就无法“自动”着色复制的代码。

由于纯文本不包含颜色信息。

这是唯一的文字。 突出显示来自Studio本身,它解析文本并根据主题和编程语言对文本进行着色。 如果您想让它看起来像工作室中的颜色代码主题,您必须自己更改颜色。 出于网站目的,您可以使用在线代码语法高亮显示器之一。

编辑:据我所知,从IntelliJ到LibreOffice和Chrome(在某些情况下)的语法高亮显示效果很好。

As long as MS Word 2013 does not support syntax highlighting for code, you are not able to "automatically" colorize the copied code.

Since the plain text does not contain color information's. It's only text. The highlighting comes from Studio itself, which parses the text and colorizes the text accordingly to the theme and programming language. If you want to have it looking like your color code theme in studio, you have to change the colors yourself. For website purposes, you could use one of the online code syntax highlighter.

Edit: As far as I known, Syntax Highlighting from IntelliJ to LibreOffice and Chrome (in some cases) works well.

2015-03-26

相关问答

.java文件位于根目录中。 我将文件移动到“src / main / java / org.we /”,语法开始工作。 The .java file was located in the root directory. I moved the file to "src/main/java/org.we/" and it the syntax started working.

我认为你应该开始阅读有关词法分析的内容 ,你也可以使用JLex从文件内容中获取令牌......你还应该阅读一些关于编译器的内容(这并不容易) I think you should start reading about lexical analysis , you can also use JLex for getting tokens from the content of the file ... you should also read a bit about compilers (whic...

再看一下codeplex网站。 在一周前发布,使用Visual Studio 2015和Cmake 3.4支持的构建: 用于Visual Studio 1.4的CMake工具 Look at the codeplex site again. Released just over a week ago, a build with Visual Studio 2015 and Cmake 3.4 support: CMake Tools for Visual Studio 1.4

您是否考虑过安装IronPython并使用它来编辑您的工作? http://www.codeplex.com/IronPythonStudio Have you considered installing IronPython and using that to edit your work? http://www.codeplex.com/IronPythonStudio

只要MS Word 2013不支持代码的语法突出显示,您就无法“自动”着色复制的代码。 由于纯文本不包含颜色信息。 这是唯一的文字。 突出显示来自Studio本身,它解析文本并根据主题和编程语言对文本进行着色。 如果您想让它看起来像工作室中的颜色代码主题,您必须自己更改颜色。 出于网站目的,您可以使用在线代码语法高亮显示器之一。 编辑:据我所知,从IntelliJ到LibreOffice和Chrome(在某些情况下)的语法高亮显示效果很好。 As long as MS Word 2013 does...

我建议在维基百科上查看Markdown以及其他一些信息。 更新 :鉴于您的更新信息(在下面的评论中),我会推荐Pygments ,这是一个Python语法高亮引擎。 I would recommend checking out Markdown with some additional info on Wikipedia. Update: Given your updated information (in the comments below) I would recommend Pygment...

第1步:下载jetbrains-monokai-sublime主题 第2步:提取拉链。 第3步:转到File -> import settings -> and select the Monokai-Sublime.jar之前解压缩File -> import settings -> and select the Monokai-Sublime.jar 。 你完成了 Step 1 : Download jetbrains-monokai-sublime theme Step 2 : Extract...

我从这里重新安装SQL Server数据工具解决了问题http://msdn.microsoft.com/en-us/data/tools.aspx I solved problem by reinstalling SQL Server Data Tools from here http://msdn.microsoft.com/en-us/data/tools.aspx

似乎有非英语语言包的错误。 如本帖所述,我将其更改为英语,现在正在使用。 It seems there's a bug with non-english languge packages. I changed it to english as stated in this post and it's working now.

您已经在Javascript中提供了许多语法突出显示工具。 您可能需要稍作修改。 看看这个 。 我每天都在博客中使用它。 You already have a lots of syntax highlighting tools available in Javascript. You may need to do slight modifications. Take a look at this. I use it in my blog everyday.

相关文章

AppData\Local\Temp\\AndroidEmulator\TMPE7AA.tmp, No

...

一、申请你的AppID http://open.weixin.qq.com/ 友情提示:推荐使用e

...

This post is about the full-text search engine

...

李刚编著的《疯狂Android讲义》全面地介绍了Android应用开发的相关知识,全书内容覆盖了And

...

Structure in the flow » Blog Archive »

...

Developers, build mobile Android apps using Android

...

private TextView text; @Override protected void o

...

一、中文分词:分词就是利用计算机识别出文本中词汇的过程。 1.典型应用:汉字处理:拼音输入法、手写识别

...

注意: 本文介绍的是Share SDK 2.x版本的集成流程和注意事项,对于Share SDK 1.x

...

最新问答

一组RadioButton没有单一属性。 您需要检查每个RadioButton的IsChecked状态。 应该可以使用转换器的ConvertBack将选定的按钮转换为枚举,但是将多个按钮绑定到相同的值会产生一些副作用。 如果您发布当前转换器的代码,我将看到提供合适的ConvertBack方法。 There is no single property for a group of RadioButtons. You need to check the IsChecked state of each

看看Microsoft Cassini ,一个用Ms-PL许可的C#编写的简单HTTP服务器。 它基本上是一个如何托管ASP.NET运行时的演示。 Have a look at Microsoft Cassini, a simple HTTP server written in C# licensed under Ms-PL. It's basically a demo how to host the ASP.NET runtime.

您可以使用View LifeCycle和Events 。 将其添加到您的控制器。 $scope.$on('$ionicView.enter', function() { $scope.$broadcast("focusTextInput"); }); You can use View LifeCycle and Events. Add this to your controller. $scope.$on('$ionicView.enter', function() { $scope.

在使用电脑的过程中,难免要与各类密码打交道,以下九种密码可能是大家用的最多的:BIOS密码、安装密码、用户密码、电源管理密码、屏保密码、开机密码、上网密码、分级审查密码和共享密码。今天,我们就谈谈这些和我们息息相关的密码,本篇文章先讲九大常用密码的前五种密码。 一、BIOS密码 BIOS(Basic Input Output System)即基本输入/输出系统,它实际上是被固化到计算机主板上的ROM芯片中的一组程序,为计算机提供最低级的、最直接的硬件控制。和其它程序不同的是,BIOS是储存在BI

将其添加到.htaccess文件中: AddType text/css .css - 这将发送正确的标头而不是x-gzip标头。 Add this to your .htaccess file: AddType text/css .css - This will send the correct headers rather than the x-gzip one.

从createUserWithEmailAndPassword方法引用 尝试使用给定的电子邮件地址和密码创建一个新的用户帐户。 如果成功,它也会将用户签入应用程序。 这意味着在注册过程完成后,您不需要再次验证用户身份。 为了确保任务完成且AuthStateListener不为空,最好将AuthStateListener添加到FirebaseAuth而不是将数据保存在onComplete方法中,代码位于官方指南中 然后,如果用户通过身份验证,则可以保存数据。 public void onAuthS

这里的参数定义: Sub InnerSub(prm As Variant) 是隐式的ByRef : Sub InnerSub(ByRef prm As Variant) 这意味着prm任何赋值也将分配给OuterSub s 。 虽然可以将数组分配给Variant变量prm ,但不能将其分配给OuterSub的String变量。 您可以通过在OuterSub定义s As Variant在保持数组时没有问题)以及在InnerSub完成后检查s的值来查看此操作。 您可以显式强制在ByVal传递变量

不要安装Visual Studio。 安装Visual C ++ Redistributable 2008和2010 。 Don't install Visual Studio. Install Visual C++ Redistributable 2008 and 2010.

您必须使用Is null而不是= null SELECT * FROM sd_menus a LEFT JOIN sd_menu_items b ON b.id_menu = a.id LEFT JOIN `sd_menu_items_value_lang` c ON c.item_id = b.id WHERE a.name = 'mainNav' AND (lang_id = 2 OR lang_id is NULL) You must use Is null and not = nu

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值