How to prevent PyCharm from automatically closing opened files? - configuration

From time to time I need to open multiple files in PyCharm. Every opened file has a visible tab on the top of the editor. From my observations when the visible tabs take the space of two rows PyCharm starts to automatically close the files opened first. How can I prevent this? Often I really need to open the files that PyCharm automatically closes and my productivity drops immediately!

Windows: Settings | Editor | General | Editor Tabs | Tab limit
Mac: Preferences | Editor | General | Editor Tabs | Tab limit
Under the Tab Closing Policy group, the default is 10, set it to some larger value.

Related

How to make quick access to log file of a project?

If there is a way in PhpStorm 2021.1 to open some files from my project ?
I want quick access to /storage/logs/laravel.log file...
Thanks in advance!
Use Bookmarks. In particular: Bookmark with mnemonic. It works on lines as well as whole files.
https://www.jetbrains.com/help/phpstorm/bookmarks.html#add-mnemonic-line-bookmark
Select a file in the Project View panel
Hit the Edit | Bookmarks | Add Mnemonic Bookmark shortcut (Ctrl+F11 here on Windows)
Select the mnemonic (I suggest selecting numeric 0..9 for a fast keyboard navigation since they have default shortcuts already assigned).
That's it. Now you can press Ctrl + digit (Ctrl + 0 in this example) to quickly open that file.
NOTES:
If you delete the bookmarked file (pretty typical situation for the log files) then the bookmark will be automatically removed (maybe not straight away but on next project opening but still).
You can also use Edit | Bookmarks | Go to Mnemonics... (Ctrl+Shift+F11 is the default shortcut here on Windows) to navigate between multiple mnemonic bookmarks (if you use Letter mnemonic and do not have custom shortcut for that)
You can also use plain/ordinary bookmarks (not mnemonics): the only difference is that you will have to use Bookmarks toolwindow or Bookmarks popup (Edit | Bookmarks | Show Line Bookmarks... Shift + F11 here on Windows) to locate and navigate to them.
Shortcuts can be changed at the usual Settings/Preferences | Keymap screen:

PhpStorm - copy & paste removes indentation

If I copy paste indented text e.g.:
foo
bar
123
to PhpStorm, then the formatting and indentation gets lost.
My PhpStorm is fresh installed
Try changing the option File | Settings | Editor | General | Smart Keys | Reformat on paste to None
If you don't want to change your global settings, you may also use Past Simple option to ad-hoc skip autoformatting on paste.

How to open all modified files in PhpStorm

The goal is simple - I want to open all modified files at once. Is there a fast way to do it?
Currently I am using Alt + 9 and then open files, but that is not fast enough (press shortcut, select all, press Enter, manually open files that are "unversioned")
You can create a macro for the keystrokes you mentioned, and assign a keyboard shortcut to it:
Edit | Macros | Start Macro Recording
Perform the keystrokes: ALT+9, CTRL+A, ENTER, ALT+9
Edit | Macros | Stop Macro Recording, give it a name
Settings | Keymap | Macros, add keyboard shortcut.

How to switch between split panes in PhpStorm

This seems like a simple task but I can't seem to track down an answer.
In JetBrains' PHPStorm, what is the shortcut for switching between split panes? (Using OS X)
The default for "Go to next splitter" for Mac users is Option+Tab
Window | Editor Tabs | Goto Next Splitter
Window | Editor Tabs | Goto Previous Splitter
Keyboard shortcuts can be changed at Preferences | Keymap

PHPStorm - Binding a Keyboard Shortcut to Close Current File

I recently moved from Windows to OS X and transferred my PHPStorm preferences in the process. On my Windows machine, I remember I had bind ctrl + w to close the current window. This is what PHPStorm listens for on my Mac too. I'd like to be more consistent in how I close my sub-windows in my applications and want to change this binding to cmd + w. I can't seem to find where in the "Keymaps" section this binding is set at. Does anyone know the name of this action?
Have you tried searching your keymap for "Close" ? This will narrow list of possible actions a lot.
In any case: Preferences | Keymap
Action: Main Menu | Window | Editor Tabs | Close