Sublime Forum

Command + S no longer saves how can I fix this

#1

Command + S no longer saves how can I fix this. Checked the keybindings and it says save is command + S

0 Likes

#2

Does something different happen when you press that key combination?

As a first troubleshooting step I would try opening the Sublime console with Ctrl+` or View > Show Console and enter the following commands:

sublime.log_commands(True)
sublime.log_input(True)

Then switch to a file and press ⌘+S and see what the console says. You should see something like:

key evt: super+s
command: save

That will verify that Sublime is seeing the keyboard input that you think it is and that it is actually executing the same command as you expect it to.

If the key is different you may have a keyboard layout issue that is making the key binding not what you expect (for example if the input language changed).

If the command is different you may have a package installed that is stealing the key from you, in which case that package may have a setting that stops it from doing that, or you could copy the key binding from the Default settings to your User settings to ensure that it’s set as what you want.

If the key and the command are right but it’s still not saving, there is something else at play, but without extra information about what happens when you press the key (or how you know it’s not saving) it’s hard to say offhand what that might be.


[edit]
When you’re done testing, you should either run those two commands again with False as a parameter to turn off logging, or restart Sublime.
[/edit]

0 Likes

#3

this is what showed up in my console…
key evt: super+s
command: save
{‘keep_blank_lines’: True, ‘max_seps_series’: 5, ‘leftjust_comments’: False, ‘parenthesize_tuple_display’: True, ‘function_param_sep’: ', ', ‘single_quoted_strings’: False, ‘max_lines_before_split_lit’: 2, ‘add_blank_lines_around_comments’: True, ‘function_param_assignment’: ‘=’, ‘add_blank_line_after_doc_string’: True, ‘assignment’: ’ = ', ‘wrap_comments’: False, ‘syntaxes’: ‘python’, ‘normalize_doc_strings’: False, ‘boilerplate’: ‘’, ‘blank_line’: ‘’, ‘max_seps_func_def’: 3, ‘wrap_doc_strings’: False, ‘subscript_sep’: ‘=’, ‘keep_unassigned_constants’: False, ‘leftjust_doc_strings’: False, ‘left_margin’: ‘’, ‘can_split_strings’: False, ‘double_quoted_strings’: False, ‘max_seps_func_ref’: 5, ‘max_char’: 80, ‘comment_prefix’: '# ', ‘indent_size’: 1, ‘dict_colon’: ': ', ‘slice_colon’: ‘:’, ‘java_style_list_dedent’: False, ‘shebang’: ‘#!/usr/bin/env python’, ‘indent_with_tabs’: True, ‘list_sep’: ', ', ‘doc_tab_replacement’: ‘…’, ‘format_on_save’: False, ‘max_seps_dict’: 3}

you asked what happens when I hit command + s the file is gone to retrieve it I hit command +z

do I have to uninstall and reinstall?

Thanks so much for your help

0 Likes

#4

The key and the command displayed are both right, so assuming that the stuff following the command: save portion is also generated at the same time, I would suspect that you have some package installed that is trying to do something like format your code on save or something similar to that, and it’s acting up on you.

Reinstalling is unlikely to fix the problem because Sublime keeps your user settings and installed packages separate from it’s install location. They hang around when you uninstall and will be reused when you install again, so you’ll still be in the same situation as you’re in now.

To get a fully clean state, instead of reinstalling you can follow these instructions to revert your Sublime back to full factory default settings (side note: the linked page makes it sound like you’re looking for a directory named Data, but actually the path that it specifies there is the actual data directory you’re looking for).

That said, what you probably want to do is try disabling all of your user installed packages, verify that save works again, and then slowly add back packages until you find the one that’s making things not work correctly for you.

To do that, you would select Preferences > Package Settings > Package Control > Settings - User to open the PackageControl settings, and then copy the packages listed in the installed_packages setting there to the ignored_packages setting in your user preferences and restart sublime. As you test you can slowly remove packages from that list of ignored packages until you find the one that breaks things.

If you do this, make sure that you end up with a list of ignored packages that’s the same as when you started; in particular you want to watch that if you have Vintage in the list of ignored packages when you start that it’s also there when you’re done.

0 Likes

#5

Sorry can not seem to locate the ignored packages

0 Likes

#6

scratch that found it. Trying it now. Thanks again

0 Likes

#7

resolved the command +s (thank you) but now I can no longer view in my browser or any browser. Any ideas?

Thanks in advance

0 Likes

#8

Which package was the cause?

0 Likes