I have this weird bar that shows up on some of the pages that I am working on in PhpStorm that is really annoying, as it often blocks what I am trying to work on. I can't move it or remove it. Does anyone know what it is and how to get rid of it?
This floating toolbar appears in Markdown files (not sure about any other file types, at very least I see it only there).
I see 3 icons only (in current stable PhpStorm 2022.2.3 version), which may depend on the features used (e.g. I have Diagrams plugin disabled):
Text only mode
Split mode: text + rendered preview
Rendered mode only (HTML preview)
https://www.jetbrains.com/help/phpstorm/markdown.html#preview
The other 2 icons visible on your screen MIGHT be for:
Visualizing diagrams for the Mermaid and PlantUML languages (I do not have them in any of my files so cannot check it. But it should be that).
https://www.jetbrains.com/help/phpstorm/markdown.html#diagrams
Pandoc Converter for HTML, Microsoft Word, and PDF formats (not using it myself).
https://www.jetbrains.com/help/phpstorm/markdown.html#convert-markdown-files
...it often blocks what I am trying to work on. I can't move it or remove it. Does anyone know what it is and how to get rid of it?
It is displayed in the top right corner where it is hard to cover anything.
I see no options anywhere to remove it. But you can "convert" it into the permanently visible toolbar instead if you prefer:
Help | Find Action...
Type registry to locate and invoke Registry... entry.
Once in the Registry, locate ide.text.editor.with.preview.show.floating.toolbar entry there (just start typing, the speed search works there)
Disable it (make sure it's saved) and restart the IDE. Now it will look like this (a fixed bar instead of "annoying floating" one):
Related
I'm trying to setup PhpStorm, so I can simply press: "Reformat Code" ( Option CMD L), before each save - and then it'll make everything look right.
But I have this case, where I don't know how to make PhpStorm make the code right.
This is the code:
As you can see, then indentation is with tabs, but the aligning of the characters are with spaces.
I want it to look like this:
It would be cool to get the solution. But it would be even cooler to be able to figure out, how I could have found the solution myself.
Further info / idea: There is a Php Codesniffer from Squizlabs implemented. So I can fix is automatically by running a sniff fix-command. It would be pretty cool, to be able to automatically setup PhpStorm's Code style settings, to correspond with Squizlabs styles, without having to gradually tune the settings one thing at the time. But I haven't found that functionality.
Solution attempt 1: Read through all Settings >> Editor >> Code style >> PHP
I couldn't find anything that resembled this.
Solution attempt 2: Disable .editorconfig
I've read quite a bit about .editorconfig and it doesn't have these nitty-gritty functions here (as aligning equal signs).
But to make sure, I tried disabling it. Didn't make a difference.
Solution attempt 3: Search setting for 'align' and 'formatting'
But I didn't find anything useful. :-/
Solution attempt 4: Update PhpStorm
I was on PhpStorm version 2022.2.1.
I tried updating to PhpStorm version 2022.2.4.
This is still in progress.
Please show what you have at Settings (Preferences on macOS) | Editor | Code Style | PHP, specifically Tabs and Indents tab.
Checking Use tab character option with unchecked Smart tabs should do just that.
https://www.jetbrains.com/help/phpstorm/2022.3/settings-code-style-php.html#php-specific-formatting-settings-for-tabs-and-indents
(Pro tip: you can copy-paste your code sample in the preview area and start changing the options; the IDE will apply the changes live on the provided code sample instead of the default one.)
Trying to create a Live Template in PhpStorm by highlighting a block of text, going to Tools > Save as Live Template.
When I do this, nothing happens. The Live Template dialog does not open and there is no other indication of an error. I can manually open the Live Template menu and add one there.
Is there a setting or configuration that is needed for this to be enabled?
PhpStorm 2017.1.4 on Windows 10
You can turn a highlighted block into a live template, but you need to make sure that there is no leading whitespace in your selected text, or it won't do anything, as explained in the original question.
This is likely a bug, see the issue in the comments to track resolution.
I have created a html page with bootstrap control and my own css. I am running the page through visual studio in chrome. I want this page to get converted into pdf with colours as it is displayed in chrome. I have not connected any printer to my system. If i give ctrl+P, my page is getting displayed without colours.
I have used 'save as pdf' extension of chrome for conversion.
It is saying 'cant access your local url'. Is there a way to print the page in the same way as it is seen in browser as a pdf
Bootstrap controls like progress bar not getting appeared in print.
Chrome “Save As PDF” works fine. You need to tick the “print background graphics” checkbox otherwise by default backgrounds are ignored.
However, the problem is that Bootstrap has included a reset for print media. What it does is to overwrite all background to white and foreground color to black, with !important.
What kills is the !important
I would recommend you to use one of the free online HTML-to-PDF conversion solutions.
Here's one for example: http://www.htmlpdf.com/
Keep in mind that some solutions may not give you the expected results. In this case just try another.
After you have found a working solution, just print the converted-HTML-to-PDF file that you downloaded.
Chrome itself acts as a pdf writer and reader, as we already know. I'm not sure why the colours are missing in the preview for printing, still, give this a try:
After Ctrl+P, you'll see the Print - Cancel options, below which there is a Destination for you to choose.
It has Recent, Local and Cloud destinations with a choice from the local ones being displayed. Go ahead and change it to Save as pdf.
Now you can save the whole webpage with the colours too.
Take a look at this
I had the same issue but found an easy solution.
Simply get the google chrome extension called : FireShot
Get it here: https://chrome.google.com/webstore/detail/take-webpage-screenshots/mcbpblocgmgfnpjjppndjkmgjaogfceg?hl=en
It will take full page screenshot of your HTML page and even local Html pages.
Then capture the full page.
After it will lead you to a new page with saving option.
Beside “Email” I suggest you to click on “PDF”. Then it will lead you to Gmail so you can send yourself the PDF.
I don’t suggest to click on print, because in my case when I saved it, there was an issue with the pixels.
Very easy.
GoFullPage - Full Page Screen Capture — works great for this case.
I have about 10 classes all in individual files. I have not looked at them for ages. Is there a PhpStorm function that would allow me to list the methods and attributes listed in the individual files?
EDIT: The solution is to highlight all the classes you are interested in and then use the diagram tool. See my answer below.
You can use PHPStorm's Structure View:
Use the Structure pop-up window or the Structure tool window to quickly jump to the desired member of a file in the editor. The Structure views provide quick navigation for all supported file types.
You can also use the Structure tool window (Alt+7). This view is flexibly configurable and useful for many tasks, apart from navigation. However, the File Structure pop-up window is the easiest way for quick navigation.
Source https://www.jetbrains.com/phpstorm/help/navigating-with-structure-views.html
Finally discovered what I was looking for.
Highlight all the classes you are interested in in Project view. Right click Diagrams->Show Diagrams (or Ctrl+Alt+Shift+U).
Arrange diagrams on screen.
Select light colored background (Ctrl Backtick) select 5: Look and Feel (not theme).
Right click on diagram and do a print preview. Select Graph for full size. Click OK and make page adjustments. I printed out my 8 classes on an 11 x 17 sheet and I am in "help-my-bad-memory-heaven". Just what I was looking for.
Hope that was useful.
You can use a PHPDoc for that. Generate API doc of your comment doc and you have a offline reference very useful and like your code.
Otherwise, you can attribute a shortcut for launch or focus on the structure view PHPStorm tools.
I work with a lot of cshtml files in VS 2012, and a constant irritation is not being able to see the path or namespace of the file I'm working on (barring mouse hover every time).
I've googled quite a bit, haven't found any answer, and no VS Extension seems to do it either. Here's a screenshot of what exactly I mean (several index.cshtml, no easy way of distinguishing):
Either in a separate toolbar underneath like regular CS code files or as the tab title itself would be fine. Does anyone know of a tool or setting for this?