简体   繁体   English

Eclipse中粗体黑色光标删除代码,我不知道如何摆脱它

[英]Bold black cursor in Eclipse deletes code, and I don't know how to get rid of it

When I edit code in the middle of statements, it replaces the current code around it.当我在语句中间编辑代码时,它会替换它周围的当前代码。 I cannot find a way to replace this with a normal cursor that only inserts data instead of replacing it.我找不到用普通游标替换它的方法,该游标只插入数据而不是替换它。 Is that functionality possible in Eclipse?在 Eclipse 中可以实现该功能吗?

查看第三条语句右侧的黑色光标

The problem is also identified in your status bar at the bottom:底部的状态栏中也发现了该问题:

覆盖状态栏中的标签

You are in overwrite mode instead of insert mode.您处于覆盖模式而不是插入模式。

The “Insert” key toggles between insert and overwrite modes. “插入”键在插入和覆盖模式之间切换。

It sounds like you hit the "Insert" key .. in most applications this results in a fat (solid rectangle) cursor being displayed, as your screenshot suggests.听起来你按下了“插入”键......在大多数应用程序中,这会导致显示一个胖(实心矩形)光标,如屏幕截图所示。 This indicates that you are in overwrite mode rather than the default insert mode.这表明您处于覆盖模式而不是默认插入模式。

Just hit the "insert" key on your keyboard once more... it's usually near the 'delete' (not backspace), scroll lock and 'Print Screen' (often above the cursor keys in a full size keyboard.) This will switch back to insert mode and turn your cursor into a vertical line rather than a rectangle.只需再次按下键盘上的“插入”键...它通常靠近“删除”(不是退格)、滚动锁定和“打印屏幕”(通常在全尺寸键盘中的光标键上方)。这将切换返回插入模式并将光标变成垂直线而不是矩形。

You might have pressed 0 (also used for insert, shortcut INS ) key, which is on the right side of your right scroll button.您可能按下了右侧滚动按钮右侧的0 (也用于插入、快捷方式INS )键。 To solve the problem, just press it again or double click on 'overwrite'.要解决问题,只需再次按下它或双击“覆盖”。

This problem, in my case, wasn't related to the Insert key.就我而言,这个问题与 Insert 键无关。 It was related to Vrapper being enabled and editing like Vim, without my knowledge.这与在我不知情的情况下启用 Vrapper 和像 Vim 一样编辑有关。

I just toggled the Vrapper Icon in Eclipse top bar of menus and then pressed the Insert Key and the problem was solved.我只是在 Eclipse 顶部菜单栏中切换了 Vrapper 图标,然后按下了插入键,问题就解决了。

Hopefully this answer will help someone in the future.希望这个答案将来会对某人有所帮助。

This issue can happen not only in but also in any of the .这个问题不仅会发生在,还会发生在任何

On systems, in my case, this issue arose when the shift and insert key was pressed in tandem unintentionally which takes the user to the overwrite mode.系统上,在我的情况下是 ,当无意中同时按下shiftinsert键时,就会出现这个问题,这会将用户带到覆盖模式。

To get back to insert mode you need to press shift and insert in tandem again.要返回插入模式,您需要再次按shift插入

In my case, it's related to the Toggle Vrapper Icon in the Eclipse.就我而言,它与 Eclipse 中的Toggle Vrapper 图标有关。

If you are getting the bold black cursor, then the icon must be enabled.如果您看到粗体黑色光标,则必须启用该图标。 So, click on the Toggle Vrapper Icon to disable.因此,单击切换 Vrapper 图标以禁用。 It's located in the Eclipse's Toolbar.它位于 Eclipse 的工具栏中。 Please see the attached image for the clarity.为清楚起见,请参阅附图。

在此处输入图片说明

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

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