Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In PyCharm, how can I save just the current file?

Tags:

save

pycharm

In PyCharm, Cmd-S saves all open files.

I want it to save only the current file on Cmd-S. I want to use Cmd-Shift-S to save all open files. How can I set that up?

Note: I have autosave turned off, like this:

Preferences > Appearance & Behavior > System Settings > uncheck "Save files on frame deactivation" and "Save files automatically if application is idle"

like image 589
Christian Long Avatar asked Sep 04 '15 20:09

Christian Long


People also ask

How do I revert a file in PyCharm?

Revert selected changes In the Changed Files pane, right-click the file that you want to revert and select Revert Selected Changes from the context menu. This results in a new commit that reverses the changes you want to undo.

Where are PyCharm files saved?

By default, PyCharm stores user-specific files for each IDE instance (configuration, caches, plugins, logs, and so on) in the user's home directory.

How do I save a file in PyCharm?

You can always save your changes manually: Press Ctrl+S or select File | Save All from the main menu.


Video Answer


1 Answers

In PyCharm 4.5.4 there is a command called "Save Document". It saves only the current file.

Go to Preferences > Keymap

Search for "Save All" in the search box on the right. Find the "Save All" command, right-click on it, remove Cmd-S and add Cmd-Shift-S. It may warn you that this will remove Cmd-Shift-S from another command; click "Remove".

Search for "Save Document". Right-click on it and add the Cmd-S shortcut.

On Windows, use Ctrl-S instead of Cmd-S.

like image 105
Christian Long Avatar answered Sep 30 '22 21:09

Christian Long