简体   繁体   中英

Android Studio paste issue

Whenever I try to paste some lines of code into a file in Android Studio it acts like this:

  1. Copied lines overwrite existing lines below caret position.
  2. It pastes several times for a single command (I copy 7 lines and press Ctrl+V just once and it gives me 49 lines)

I don't know if this is some weird coding feature that I'm unaware of.

How can I turn this behavior off and make it work the ordinary way?

Update it's not a keyboard issue. No problem in Visual Studio!

In case someone else should face a similar issue in the future, mine was fixed after I marked and then unmarked Column Selection Mode (Alt+Shift+Insert).

Still strange but it resolved the issue!

I have the same issue I fix by clear android studio cache

File ---> Invalidate Caches/Restart

在此输入图像描述

Another solution

instead using ctrl + v Use ctrl + Alt + Shift + V

Probable Reasons:

  1. You are copying from somewhere where lines are hiding inside compact brackets
  2. Your keys/keyboard is gone might generating 7 times same signal for a command (7*7 = 49)

Please check

在android studio 2.2或更高版本中按住Control键,然后拖动布局或小部件以复制

按键盘上的“插入”按钮(标有“ins”)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM