Eclipse 文本光标已更改,编辑器的行为也有所不同

我按下了一个神奇的按钮,现在我的光标(显示输入位置的闪烁的东西)分裂了,现在 Eclipse 就像一个纯文本编辑器/类似于 Microsoft Word。光标通常看起来像“ |”,现在看起来像“”(维基百科称之为“ 酒吧坏了”或“分块规则”,而不是普通的“ 垂直杆”)。

我只是想知道如何让 Eclipse 恢复正常,以及我不小心做了什么,这样就不会再发生了。

96057 次浏览

Maybe you pressed the insert key, which will change the Eclipse editor to Overwrite rather than Smart Insert (see the info bar at the bottom of the editor), and will change the cursor to a block rather than a vertical line?

Update: Thanks for clarification - see mikej's answer which is correct. I'll leave this answer in case anyone has the similar, related problem that I describe.

It sounds like you have accidentally switched from Smart Insert mode to Insert mode.

Press Ctrl + Shift + Insert or tick Smart Insert Mode on the Edit menu to switch back.

Smart Insert is the feature that automatically insert closing quotes and brackets when you type the opener and places semi-colons at the end of the line when you press semi-colon (if you have the preference for that enabled.)

I've encountered this symptom in Eclipse 3.7 before. And after I restarted machine, it disappeared.

@Jeremy by saying " I have a vertical line with a gap in the middle of it, like the character above the forward slash " i guess you are referring to the ' Pipeline 'symbol, the one you use to denote' OR ' in programming languages. As people already answered, you are in Raw Insert Mode (as opposed to Smart Mode) so try Edit->Smart Insert Mode (Ctrl+Shift+Insert by default). For more info you can visit this thread http://www.eclipse.org/forums/index.php/t/53833/

And remember, the symbol is called 'Pipe' symbol or 'Pipeline' symbol.

If nothing works, restart eclipse. That is what I did !

I also had same problem, you can fix this by pressing just INSERT button on keyboard (on windows platform) also.

It worked for me.

or you can restart your eclipse.

Just double click on "Smart Insert" / "Overwrite" in eclipse status bar

For reference, I am adding image.

Ecliple - Status Bar

Just click

Toggle Vrapper Icon in Toolbar..

That may causes some issues like these. Because I'm also faced the same issue until today.

Please refer the below images to get clear idea about this.


Toggle Vrapper Icon

Make sure that it is in disable mode in status bar
Status bar Confirmation

On my windows computer I press Shift + 0 but the zero has to be on the numeric keypad not the top row numbers.

Shift + 0 toggle my cursor.

If your cursor symbol is " + " then press Alt+Shift+A. or else we can use Edit menu options ==> Toggle Block Selections

If you are using spring tool suite then you can double click on highlighted Smart Insert . Some keyboards do not have insert button.

enter image description here