PhpStorm - copy & paste removes indentation - phpstorm

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.

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:

How To Install MediaWiki 'Notes' Extension

I'm using MediaWiki 1.32 and I've been trying to get the Template:Note to work. From what I gathered, I don't have the Note template installed in my wiki/extensions folder.
My goal is to create Info/Warning/Danger type of short notes (with a small icon) similar to the ones found at the top of the following page.
If this extension is not available, are there any similar Note Extensions I could download/install. Or should I create this Note's effect using MediaWiki Table manually, as described below?
{|class="wikitable"
| [[File:Info-icon.png]]
| This Message is the least ugliest fancy table
|}
Question starts to date but anyway...
You don't need any extension to do that, just use a template, lets call it Template:Note, with this content:
<includeonly>{|class="wikitable"
| [[File:Info-icon.png]]
| {{{1}}}
|}</includeonly>
And call it as follows:
{{Note|This Message is the least ugliest fancy table}}

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 prevent PyCharm from automatically closing opened files?

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.

Make PhpStorm show changed/modified files in project view

After moving from Zend Studio (ZS) to PhpStorm, I am starting to miss the way that ZS used to show changed files and display more than one project at once.
For example, notice how it shows that IndexController.php has been modified.
Is there any way to do this with PhpStorm?
Starting from PhpStorm 2022.1:
To highlight folders containing vcs changed files enable:
File | Settings | Version Control | Confirmation | Highlight directories that contain modified files in the Project tree
Older versions:
As mentioned in comment by LazyOne;
The Project panel does highlight any VCS changes,
but to also highlight all parent-folders of changed-files, enable:
File | Settings | Version Control | Show directories with changed descendants
All kudos to LazyOne!
Pressing Alt + 9 (not from numpad) you can get a panel with the changed files.
Go to file >> settings >> Editor >> General >> Editor Tabs.
Check Mark modified tabs with asterisk
Click ok
For PhpStorm version 2022.1.2, on MacOS Big Sur, you will need to go to:
Preferences -> Version Control -> Confirmation, then under Changes you will need to check the "Highlight directories that contain modified files in the Project tree" box.
Another alternative: ctrl + shift + e
To be more specifically. Under File Status (settings)
[option] Have changed descendants
[option] Have immediate changed children
[option] Modified
Change this three color
Another alternative : ctrl + e
PhpStorm store all the changes on your file. If you use Git or VCS it is easy to see what changes you have, but this is also availabe for normal local projects.
Open:
VCS -> Local History -> Show History
You will see the big windows divided on 2. Left showing all the versions, right all the modified files. Double click also gives you a diff windows, showing diference between both files.
All The modificationas are shown as a scalar one, means that selecting left the top one will show just last modification. Selecting in left the scond will show agregated modification since this time.
Let me know if you need more explanation.
As in PhpStorm 2021 you can achieve it by going to Settings > Version Control > Git and check Enable Staging Area
In a Git toolbar (ctrl+9) tab named Local changes
If someone is still looking for solution:
Go to View & look for Changes option, it should bring up the tree view of changes for current project.
You can also do show diff with current working tree in VSC pane.