问题
I'm using Eclipse Juno on MacOSX Lion and have an issue with typing.
I often print one quote/apostrophe and move the caret. But in this Mac version of Eclipse the quote as I type is highlighted by orange marker (it seems like Mac smart quotes feature) and when I move caret - quote disappears. (in Xcode and Appcode everything works ok).
I tried
defaults write NSGlobalDomain AutomaticQuoteSubstitutionEnabled -bool false
to disable smart qotes globally, restarted the computer, but this doesn't help.
Also I tried to find in Eclipse preferences something related to "quote", "smart", "correction" but had no luck.
Tried to disable 'Smart insert mode' - useless.
Tried to set Java -> Typing -> Automatically close -> Strings
to on
- but now, when I move caret after printing a quote, Eclipse doubles it instead of removing like before. Also annoying. Why on earth in other programs quotes handling works as expected but I can't get it work the same way in Eclipse?
By the way, when I recently pressed quote and then a I got 'ä' symbol. So I assume this is something related to autocorrection.
But even if I disable Language & Text -> Automatic replacement
, Eclipse replaces " + a to ä.
How to disable this behavior?
回答1:
Yes! It's a shame that I didn't know about such a simple thing - but this is because I'm not a mac-maniac, I live on several OSes at once. When I've found out that quote + symbol gives me an accented character I've realized what's happening.
This was very easy:
- Launch System Preferences, open the Language & Text pane.
- Click the Input Sources tab.
- In the list of input methods on the left, scroll down and enable U.S., disable U.S. International.
This 'U.S. International' did all the evil. Some IDE use their own input system, while Eclipse uses common input. This feature is one of those 'little convenient things' (just like smart quotes) which turn my life on mac into nightmare sometimes.
回答2:
If you are looking to disable auto accents for languages other than U.S. English, I made a workaround solution here: How to prevent the typing of special characters like "~" modifying the next keyboard input?
来源:https://stackoverflow.com/questions/12723236/macosx-how-to-disable-accented-characters-input