简体   繁体   English

如何在Android Studio中粘贴没有格式化的格式化文本?

[英]How to paste a formatted text without its formatting in Android Studio?

I am using Android Studio for programming. 我正在使用Android Studio进行编程。 I have faced difficulties many times while copying regular expressions. 复制正则表达式时,我遇到过很多次困难。 Whenever I copy any regex and paste it, it removes the escape character every time and I have to manually type those escapes to make it a valid regex again. 每当我复制任何正则表达式并粘贴它时,它每次都会删除转义字符,我必须手动键入这些转义符以使其再次成为有效的正则表达式。 I tried to check intelliJ settings but did not get any option to turn off this feature. 我试图检查intelliJ设置但没有任何选项来关闭此功能。

This question did not answer my question fully but I realised that it is a problem in java itself. 这个问题没有完全回答我的问题,但我意识到这是java本身的一个问题。

Please guide me how to avoid this problem especially since the regex strings sometimes run into hundreds of characters and it becomes difficult to track all the changes. 请指导我如何避免这个问题,特别是因为正则表达式字符串有时会遇到数百个字符,并且很难跟踪所有更改。

Good answer from Mohan: Mohan的回答很好:

I had never tried this simple thing. 我从未尝试过这么简单的事情。 Its called "Paste Simple". 它被称为“粘贴简单”。 Hotkey: Ctrl + Alt + Shift + V . 热键: Ctrl + Alt + Shift + V. This solves my problem. 这解决了我的问题。

No such problem with Eclipse/ADT, at least with the regex you posted. Eclipse / ADT没有这样的问题,至少你发布的正则表达式是这样。 If pasting into a comment (and making it a string later) does not help, you may try to use an external text editor, like NotePad or gedit. 如果粘贴到注释中(并在以后将其作为字符串)没有帮助,您可以尝试使用外部文本编辑器,如NotePad或gedit。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 从JTextPane复制/粘贴到其他应用程序,不支持文本格式 - Copy/paste from JTextPane to others application without text formatting support 如何以原始形式将文本从 docx 输入到 Android Studio? - How to input text from docx to Android Studio in its original form? IntelliJ:将文本复制并粘贴为格式正确的注释 - IntelliJ: Copy & paste a text as comment well formatted 如何在Android SD卡中制作表格格式的文本文件? - how to make table formatted text file in android sd card? 如何在 textview 中设置文本并将其格式化为代码? (安卓 Java) - How set text in textview and formatted it as code? (Android Java) 在Android Studio中没有文本字段和按钮的文本到语音 - Text To Speech without textfield and button in Android Studio 如何将剪贴板数据自动粘贴到 android 中的文本编辑器? - How to paste clipboard data to text editor in android automatically? 有没有办法在 Android Studio 中不使用复制/粘贴方法将代码从 Java 转换为 Kotlin? - Is there a way to convert code from Java to Kotlin in Android Studio without using the copy/paste method? 如何将标签转换为空格并在android studio中保存时自动格式化 - How to convert tabs to spaces and auto formatting on save in android studio 使用Android Studio在JAVA中格式化字符串 - Formatting strings in JAVA with Android Studio
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM