PhpStorm: how to Make the inspector / debugger ignore stuff in comments? - phpstorm

I don't need it telling me I spelled the word "danggit!" incorrectly. I just want it to ignore the comments.
like this:
<?php
$a = 123;// simple as, danggit!
/* danggit, this frustrates me! */
also
"The word 'thru' is informal. Consider replacing it with through."
I dont want to see this, especially in comments

I don't need it telling me I spelled the word "danggit!" incorrectly. I just want it to ignore the comments.
You can configure where this "Typo" inspection should be applied at the following screen: Settings/Preferences | Editor | Inspections | Proofreading | Typo.
https://www.jetbrains.com/help/phpstorm/spellchecking.html#configure-the-typo-inspection
Danggit, now i'm getting "The word 'thru' is informal. Consider replacing it with through." I dont want to see this, especially in comments.
This is a different thing in action. This time it's Grammar.
Settings/Preferences | Editor | Natural Languages | Grammar and Style -- Here on a Scopes tab you can configure the same. https://www.jetbrains.com/help/phpstorm/grammar.html#scope
... or/and configure what rules to use (on a Rules tab): https://www.jetbrains.com/help/phpstorm/grammar.html#rules
In case if you need to configure too many of them, well... just disable the Grammar checks completely: Settings/Preferences | Editor | Inspections | Proofreading | Grammar

Related

Intellij IDEA: newline after specific tag (br)

Is there a way to create a newline after a specific tag, in my case e.g. after every <br>? I've searched the settings under "Editor | Code Style | HTML | Other", but couldn't find it...
There is no such option, please vote for WEB-5182 to raise its priority and get notified on updates

How do I stop PhpStorm 2016.2 from entering the form tag when I type the word "form" into a paragraph?

After typing the word "form" and entering a space, PhpStorm makes a form! No! No! How do I get PhpStorm to stop doing that?
p.s. stackoverflow won't let me post the images because my reputation is <10 :(
UPDATE. My progress.. or lack thereof:
I've done this without success:
Settings | Emmet | XML | Enable XML Emmet -- disable this option. (as recommended in How can I disable html tag completion in PHPStorm)
Settings | Editor | General | Code Completion | Autopopup code completion -- unchecked it (as recommended in Turn off autocomplete in PhpStorm)
Settings | Editor | General | SmartKeys | XML/HTML | Auto Close tags when typing

Turn off highlights

I want to turn off PHPStorm's annoying highlighting for non-error related things.
I read their docs, which said to go to preferences->editor->inspections. I deselected all for SQL, yet I still get this green highlighting for no reason:
How do I disable this? It's quite distracting.
That's Language Injection in action.
You can:
Remove/change background color at Settings (Preferences on Mac) | Editor | Colors & Fonts | General --> Code | Injected language fragment
Disable that particular injection rule altogether at Settings (Preferences on Mac) | Editor | Language Injections

PhpStorm remove line wrapping for "use statements" from code formatter

I would like to remove the line wrapping for the use statements in a php class when I apply Code | Reformat code.
current look:
use
Acme/Foo/Bar;
(my) desired look:
use Acme/Foo/Bar;
I've been looking at the File | Setting | Code Style | PHP but could not find it.
Another question is that is it possible to wrap logical operators but no other binary operators using the formatter. I don't expect much though..
Think I am relying too much on the auto-formatter. Now I figured out that I can just do whatever I want (manually) by disabling most of the line wrapping options but enabling the keep line breaks option. The "use statements" formatting as mentioned in my question is because I ticked on the wrapping option under File | Setting | Code Style | PHP | Wrapping and Braces | Function declaration parameters.

How to setup content in other languages?

I would like to allow users to create content for their own languages. I am running a single MediaWiki instance, so I cannot set it up for one language per install.
I would like to try and format the pages like the following, where a different language version of the page has the language code appended to it.
myWiki/SomePageContent
myWiki/SomePageContent/de
myWiki/SomePageContent/fr
How can I ensure users follow this structure? Is there some setting in MediaWiki that can help with this? I have no idea what are best practices for this.
Thanks!
Best practices are to use a separate instance of MediaWiki for each language and use interwiki links to connect them. This way, users are in one language and everything works as you'd expect: if you're in the English instance, a link to [[Foo]] stays in English, and only a link to [[fr:Foo]] goes to the French Foo. It's not particularly hard to set this up even with a single server and single database, see http://www.mediawiki.org/wiki/Manual:Wiki_family. The way this appears to the user is configurable: eg. Wikipedia uses http://en.wikipedia.org/wiki/Paris, Wikitravel uses http://wikitravel.org/en/Paris.
If this is not possible for whatever reason, the next best thing to do is to set up a separate namespace for each language (eg. "de" or "fr"), and this way you can at least do eg. searches across one (or more) languages. However, users of languages other than the 'main' language still have to manually punch in the language code in front of every article name and link, so it's not nearly as user-friendly. See http://www.mediawiki.org/wiki/Manual:Namespace.
An easier way for smaller wikis is through the use of a simple template. It may not be as efficient as an extension or creating a family of wikis, which is a lot of work, but quite fast to set up.
Create a page under Template:Otherlang with the following code:
{{otherlang
|ru=Template:Otherlang:ru
}}
This template adds available translations for the page to the top through the use of flags.
To prevent issues, this template must be placed '''at the very beginning of a page'''.
Tip! When contributing a new translation to a document that already has other translations, please carry over the existing translations to the otherlang template of your contributed page. This way all multilingual pages are linked.
== Syntax ==
{{otherlang
| noborder=true (OPTIONAL)
| title=localized page display title
| lang=page:lang
| lang2=page:lang2
| etc...
}}
Warning! Do not include the language of the current page. This will only confuse readers.
=== Example ===
On a page called [[Template:Otherlang]]:
{{otherlang
| title=Template:Otherlang
| ru=Category:Programming:ru
}}
Note that:
* The language "en" is not included, as it is the language of the page that template is being used on.
* title is assigned the translated name of the page, and will appear as the display title (heading) for the page. This can replace the existing {{wrongtitle}} and {{DISPLAYTITLE}} templates currently in common use.
* The English page has no suffix.
== Available Languages ==
{| class="table table-bordered" border="2" cellpadding="7"
! Language
! Syntax
! Result
|- id="en"
|English
|en=Page_name
|[[File:En.png]]
|- id="ru"
|Russian
|ru=Page_name:ru
|[[File:Ru.png]]
|}
{{#if: {{{title|}}} | {{DISPLAYTITLE:{{{title}}}}} }}{{#if: {{{en|}}} | '''[[File:En.png|alt=English|link={{{en}}}]]''' }} {{#if: {{{ru|}}} | [[File:Ru.png|alt=Русский|link={{{ru}}}]] }}
Then within each English article, paste use the following code to get a flag to show up, representing the respective language.
{{otherlang
| title=Tutorials/Galacticraft Getting Started Guide
| ru=Tutorials/Galacticraft_Getting_Started_Guide/ru
}}
An example of this can be found here. If you click on the Russian flag to the right you will find a Russian translation of the article.
anyone interested, you might wanna try this
http://www.mediawiki.org/wiki/Help:Extension:Translate
when this page
myWiki/SomePageContent
is translated to German, it will create the link like this:
myWiki/SomePageContent/de
and so on :)