Intellij IDEA highlight all occurrences of selected text - intellij-idea

Currently, intellij highlights all occurrences of the word under the caret. How can I change it so that it doesn't do that, and instead will highlight all occurrences only when I select the word (eg: similar to sublime text) ?

https://plugins.jetbrains.com/plugin/201-browsewordatcaret
From the plugin description:
Allows to easily browse next/previous word at caret and highlight
other appearances of selected word.
I'm using it and it works perfectly.

The following worked for me in IntelliJ 2018.2.3:
Disable automatic highlighting of usages by unchecking:
Preferences | Editor | General | Highlight usages of element at caret
Add mouse shortcut for Highlight Usages in File:
Preferences | Keymap | Main menu | Edit | Find | Highlight Usages in File
My mouse shortcut was: Shift + Control + Double Click

I am using Webstorm 2021.2 at the moment and this feature is working. Just for your information. Hope you also already updated to the latest.

Settings -> Editor -> Code Editing -> Highlight on Caret Movement -> Usages of element at caret

Related

IntelliJ IDEA: move caret to end of word

(running MacOS)
I'm used to option+left/right arrow moving the caret to the end of the word. In IntelliJ it instead moves to the next word, see below example.
If I'd press option+right arrow, the caret would move to below position:
Can I somehow configure IntelliJ so that it moves to below position instead?
IntelliJ IDEA 2019.2 introduces the following new options for the Caret Movement (File | Settings (Preferences on macOS) | Editor | General):
Set the "When moving by words" option to "Always jump to word end".

how to disable word highlighting in Intellij idea?

some words are automatically highlighted in intellij how can I disable them,words which have been highlighted are in use,and it only gets highlighted when they are in use by some other piece of code.How can i disable this?
in the pic there are some words which are highlighted
Activating automatic highlighting of usages
Open the Settings dialog box (File | Settings for Windows and Linux or IntelliJ IDEA | Preferences for macOS), and click General under the Editor node.
On the General page that opens, select the Highlight usages of element at caret check box in the Highlight on Caret Movement area.
Or you can select highlighted text and press Ctrl+Shift+F7(Windows or Linux).

How to set default show line number and white space in PhpStorm 2016.1

How to make line number visible in PhpStorm 2016.1?
I can't find setting in preferences.
Use CMD+SHIFT+A (on Mac) to search for actions across the IDE, including the preference pane. In this instance, typing "Line Numbers" into the search box takes you right to the preference pane for that option, with it highlighted nicely for you (http://c.hock.in/17c45d.png). This works for any settings you can't find, or want to find quickly.
Preferences if your are on Mac | Editor --> (General) --> Appearance --> Show line numbers.
File->Setting->Editor->Appearance->show line numbers for Windows users
1.
PhpStorm 2016.1 for Active Editor only
Main Menu:
View -> Active Editor -> Show Line Numbers
===========================================
2.
PhpStorm 2016.1 for all tabs
Main Menu
File -> Settings:

IntelliJ align multiple lines of code vertically

I am wondering how to align (the keyboard shortcut) a line or a block of code with the previous line, so that they have the same indention or starting from the same column in IntelliJ and PyCharm.
cheers
I think that "Emacs Tab" could help you. You can use setting search to find it or you can go Preferences -> Appearance & Behaviour -> Keymap. It is editor action and in some Keymap settings it doesn't have assigned key shortcut. I personally prefer remap Tab key to this action.

Php Storm : How can i automate breaking lines in PHPStorm 2.1

How can i automate breaking lines (word wrap) in PHPStorm 2.1?
Automatic wrap example aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa‌aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa :
This expression has automatic wrap, because I did not press return.
As I understand you want Soft Wraps, when long line is wrapped on screen into multiple lines, but still remains as single line in file.
Soft Wraps
on per file basis
View | Active Editor | Use Soft Wraps
for all files by default
Settings/Preferences | Editor | General | Use soft wraps in editor
Right margin setting
There is also
Settings/Preferences | Editor | Code Style | General --> Wrap when typing reaches right margin
But that's different (it will make actual new line).
UPDATE: In current builds IDE can use separate value for right margin per different "language" -- as long as that language has an entry in Code Style settings.
Also keep in mind that any settings from .editorconfig files (if you have such files in your project and EditorConfig plugin is installed & enabled) will override the same from Code Style settings -- it's the nature of the plugin and not a bug (it meant to work this way).
Using EditorConfig support you can configure certain settings that otherwise may not be possible to do via Code Style (e.g. settings for languages/file types that have no separate Code Style entry).
Open Settings
Type "Use Soft Wraps" in search box
In keymap tab right click on "Use Soft Wraps" and add a custom shortcut
You will be able to toggle them with that shortcut
In PhpStorm 2019.1.3 You should add file type you want to make soft wrapping on it
go to Settings -> Editor -> General -> Soft-wrap files then add any types you want
For wrapping text/code line by deafault:
File -> Settings -> Editor -> General -> section "Soft Wraps" -> checkbox "Use soft wraps in editor"
In Webstorm 2020.3 i did not found any option for all files by default, but just change the pattern:
for ALL files:
Settings > Editor > General > Soft Warps >
Soft-wrap theses files: you can change value to:
*.*
(in the other words "ANY file name" and "ANY extension file")
for SOME FILES:
*.php; *.html
(Any files with exntension .php OR .html)
simple:
cmd+F8
You can find the list of shortcut by PhpStorm in menu Help -> Default Keymap Reference!
in phpstorm 2016:
Settings/Preferences | Editor | Code Style | General --> default option-> uncheck wrap on typing
To make it automatic
After applying this point:
Use Ctrl + Alt + S to open the settings menu
Select and click Editor
Choose Code Style
Change the default value of the Hard wrap value to 90
Go back to CodeStyle and choose any of the language you work with to make specific changes
5.1 I choose HTML and Select Other and i change the value of Hard wrap at 90 and wrap on typing to Yes
5.2 I choose JavaScript and Select Wrapping and Braces and change the Hard wrap at value to 90 and wrap on typing to Yes
Continue to do it with all other languages you work with
NB: other languages may be at a default values, change it if is not preferable to you
Apply and Ok to save the changes
Using phpstorm 2019.3.4 as well as new and older version :
Use Ctrl + Alt + S to open the settings menu
Select and click Editor
Choose Code Style
Change the default value of the Hard wrap value to 90
Apply and save changes
Press Ctrl + A to highlight and select all your codes in the text editor
Press Ctrl + Alt + L to format your code nicely
Or when using the default settings for Hard wrap at 180 , follow 6 and 7