简体   繁体   中英

I can't type curly braces in Eclipse

I have been working with Java in an Eclipse IDE. I can type every single character just fine except for the '{' character. I need to resort to Ctrl+c and Ctrl+v every single time when I want to create a new block of {}.

In the Window>Preferences>Editor>Typing Braces are on, and they autocorrect just fine after I manage to copy a {.

Outside eclipse, in a text editor, or even in this question, I can type { by hitting Atl Gr + B, so I am thinking the problem is inside Eclipse.

Any help would be really appreciated, this error is getting quite annoying.

The problem is with the skip breakpoints option. After unbinding the Alt+B key command, try to unbind the Ctr+Alt+B (skip brakepoints).

This solved my problem. If you try to type the "{" you can see the skip breakpoint option flashing.

转到 Windows-> 在搜索字段“绑定”中键入首选项,单击键,查找 Alt+B,单击它,然后单击取消绑定命令。

解决方案:窗口 → 透视图 → 自定义透视图 → 调试 - → 指向跳过所有断点 → 键绑定并将其从Ctrl + Alt + B更改为Ctrl + Alt + M

Because people work differently and on different things, Eclipse makes it easy to change shortcuts and also to view shortcuts for the commands you use a lot.

In your case: Window->Preferences->Keys -> ctrl+alt+b Unbind Command should do the trick. It also the same in Spring Tool Suite 4(It is an Eclipse-based development environment.)

There is a usefull article about eclipse commands: How do you manage keyboard shortcuts

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