在Default(OSX).sublime-keymap文件中,我看到:
{ "keys": ["ctrl+space"], "command": "auto_complete" },
{ "keys": ["ctrl+space"], "command": "replace_completion_with_auto_complete", "context":
[
{ "key": "last_command", "operator": "equal", "operand": "insert_best_completion" },
{ "key": "auto_complete_visible", "operator": "equal", "operand": false },
{ "key": "setting.tab_completion", "operator": "equal", "operand": true }
]
},
但是我希望它的功能更像Eclipse,在点击.
并等待一瞬间后,可用的方法会弹出。这可能吗?
答案 0 :(得分:0)
请记住,Sublime Text不是IDE。因此,Eclipse之类的完成(它只提供了你可以为特定变量调用的方法)并没有内置。你可以尝试像SublimeJava之类的东西来完成更像Eclipse的完成。我使用了一下,结果好坏参半。它没有Eclipse那么好,但是对于我正在做的事情,这是可以接受的。当您按“。”时调出当前的完成集(默认情况下在文件中),您可以将以下内容添加到您的用户首选项(可通过Preferences -> Settings - User
访问)。
"auto_complete_triggers": [{"selector": "source.java", "characters": "."}]
当您在java文件中输入.
时,这将导致显示自动完成弹出窗口。