I'm using VSCode, and it has a nice thing to match characteres (without ctrl+f). Same as the image below.
Is there any plugin to sublimeText to do the same thing?
Thanks!
I was curious about this, so I've done some research:
There's a SublimeText plugin that does exactly what your are looking for:
SublimeText/WordHighlight can be easily installed via Preferences -> Package Control -> Install package -> WordHighLight (or the shortcut ShiftCtrlP -> Type Install package -> Type WordHighLight).
Once installed, when a word is selected, all matching words in the document are highlighted:
I've tested it successfully in SublimeText 3.
Don't forget to add
{
"highlight_non_word_characters": true,
}
...to your Preferences -> Package settings -> WordHighLight -> Settings - User in case you want to highlight partial words, as the sample you provided. Otherwise, only complete words are highlighted.
Related
When I press my shortcut to rename a variable (precisely it's the "Main menu" > "Refactor" > "Rename..." shortcut), the entire word is selected.
Is it possible to change the behavior so that simply the refactoring is activated and the cursor stays in position (it already does, this is fine) and that I can directly add or remove a character?
Right now, if I have a variable "myVarible" and I put my cursor between "i" and "b" to add the "a", press the shortcut, and type an "a", my entire variable becomes an "a", as the entire word was selected by the shortcut.
In Eclipse this seems to be the default behavior already, and I liked it much better. How can I change this in Intellij?
You can do this by going to Settings -> General -> Refactoring and just deselect "Preselect old name" or just type Refactor in search box in settings so it will automatically go on above menu.
From IntelliJ 2018.2.6, the checkbox to disable is still "Preselect old name".
That is located in :
"Settings" menu
-> "Editor" section
-> "General" subsection
-> "Refactorings" part
You can also just enter "refactorings" in the search box to find it.
Aaaand it moved again!
It's probably the best to just search for Refactorings or Preselect old name, as it might move again in the future.
In my version 2020.1.2 it is under
Settings -> Editor -> Code Editing -> Refactoring
It has changed name since the other answers, in 2021.2.3, It's still under Settings -> Editor -> Code Editing -> Refactorings however it's now named Preselect current symbol name for Rename refactoring.
It is possible to delete these method's lines counters:
I was looking in options and I haven't find any way to disable it.
To disable line counters go to:
Tools -> Options -> Editor -> Folding
At the bottom uncheck Show summary.
However there is no option to remove {...} entirely.
Tools -> Options -> Editor -> Folding
I am trying to indent my code in eclipse .
List<TestDB> list=session.createCriteria(TestDB.class).add(Restrictions.eq("testCase",testCase)).list();
I type my code as above and when I save my code the line is indented as follows :-
List<TestDB> list = session.createCriteria(TestDB.class)
.add(Restrictions.eq("testCase", testCase)).list();
I tried this from SO :-
How do I disable auto-indent in Eclipse Helios (Java)?
But it is did not help . Can anyone please help me with the indentation ?
Window -> Preferences -> Java -> Editor -> Save Actions -> Deactivate Perform the selected actions on save.
Also right click your project, select Properties and check the same setting here.
When a method or variable is selected it is highlighted in Eclipse with some color. Can anyone advice where to change that color? I'm working under Windows OS.
I've found where to change it:
Preferences -> General -> Editors -> Text Editors -> Annotations
and there you have to change both "Occurrences" and "Write occurrences".
Preferences -> General -> Editors -> Text Editors
Current Line Highlight
I think you want the above
else
Preferences -> Java -> Editor -> Syntax Coloring
Element -> Java -> Method or Variable
Check Enable and select color
This has made me mad for about half an hour.
If the issue appears in JavaScript files, the option is under Preferences -> General -> Editors -> Text Editors -> Annotations and in the Annotation types choose JavaScript Occurences. Mine was set to black, nasty little thing took me too long to fix.
If you're using eclipse with PHP package and want to change highlighted colour then there is slight difference to above answer.
Right click on highlighted word
Select 'Preferences'
Go to General > Editors > Text Editors > Annotations. Now look for "PHP elements 'read' occurrences" and "PHP elements 'write' occurrences". You can select your desired colour there.
I have customized my own colors in eclipse but cannot find where to change the auto highlight color when you click on a variable and it highlights all other uses. Has anyone done this before?
Preferences -> General -> Editors -> Text Editors -> Annotations -> Occurrences
How to change your various variable background-highlighting "occurrences" settings
For anyone who'd like a screenshot and more details:
Tested in Eclipse 2022-12 (4.26.0) on Ubuntu 22.04.
You may have various "Occurrences" settings to change. Each one causes variables of the same name from various language file types to be highlighted in different kinds of files. I have 5 or so "occurrences" settings in Window → Preferences → General → Editors → Text Editors → Annotations → in the “Annotation types” window:
Bash occurrences
C/C++ Occurrences
C/C++ Write Occurrences
Occurrences
Occurrences (LiClipse)
I have changed all 5 to the same custom color: #414104, which is a nice-looking brown which looks great for dark themes.
Here's a screenshot prior to changing that setting for "Occurrences (LiClipse)":
And here's the new color I set all 5 to: #414104:
References:
The accepted answer
I first wrote about this in my Eclipse setup instructions on a new Linux (or other OS) computer document, where I have documented this and a lot more.