sublimetext 3 按回车键禁用自动完成
sublimetext 3 disable autocomplete upon pressing enter
我想要 sublimetext 的这种行为disable/change:
当 sublimetext 显示自动完成建议的弹出窗口时,如果我按回车键,它会自动完成该建议而不是换行...我不希望那样。
例如:
def getuname(filename):
try:
with open(filename) as fo:
uname = json.load(fo)
except FileNotFoundError:
return None <<<<<<<<<<<<<<<<<
else:
return username
在键入 None
并按回车键后,它会自动完成 None
到 FileNotFoundError
,因为 None 中的字母在 FileNotFoundError 中。我可以按 press space 然后按 enter 键,但这在编写代码时真的很困扰我...
如何禁用此功能?
如果您转到 Preferences > Settings >
,您可以查看具有以下值的文档 Default/Preferences.sublime_settings
:
"auto_complete_commit_on_tab": false
您应该更改为 true
,然后它会将完成从使用 Enter 键切换为使用 Tab。
auto_complete_commit_on_tab
的文档:
By default, auto complete will commit the current completion on enter.
This setting can be used to make it complete on tab instead.
Completing on tab is generally a superior option, as it removes
ambiguity between committing the completion and inserting a newline.
注意:您应该在拆分上下文中的第二个文件中进行更改 window (User/Preferences.sublime_settings
)。
我想要 sublimetext 的这种行为disable/change:
当 sublimetext 显示自动完成建议的弹出窗口时,如果我按回车键,它会自动完成该建议而不是换行...我不希望那样。
例如:
def getuname(filename):
try:
with open(filename) as fo:
uname = json.load(fo)
except FileNotFoundError:
return None <<<<<<<<<<<<<<<<<
else:
return username
在键入 None
并按回车键后,它会自动完成 None
到 FileNotFoundError
,因为 None 中的字母在 FileNotFoundError 中。我可以按 press space 然后按 enter 键,但这在编写代码时真的很困扰我...
如何禁用此功能?
如果您转到 Preferences > Settings >
,您可以查看具有以下值的文档 Default/Preferences.sublime_settings
:
"auto_complete_commit_on_tab": false
您应该更改为 true
,然后它会将完成从使用 Enter 键切换为使用 Tab。
auto_complete_commit_on_tab
的文档:
By default, auto complete will commit the current completion on enter. This setting can be used to make it complete on tab instead. Completing on tab is generally a superior option, as it removes ambiguity between committing the completion and inserting a newline.
注意:您应该在拆分上下文中的第二个文件中进行更改 window (User/Preferences.sublime_settings
)。