I am using Eclipse Luna. I have installed the Perl EPIC plugin. I want to indent 4 spaces instead of TAB.
I have checked Window -> Preferences -> General -> Editors -> Text Editors -> Insert spaces for tabs, but still when there is need to auto indent a new line, Eclipse still indents with TAB instead of spaces.
How do I change it so EPIC will use spaces instead of tabs for indentation in Perl files?
Late answer but I ran into the same issue, found this post, and subsequently how to change the formatting settings for Perl EPIC in Eclipse.
From the main IDE workspace, click the Window menu and then choose Preferences.
Scroll down to Perl EPIC and expand it in the tree.
Click the Editor entry.
In the right panel under the Appearance tab, you can change your preferences for Insert tabs/spaces on indent and whether or not to use spaces instead of tabs.
I am using Adobe's ColdFusion Builder, an Eclipse-based IDE built on top of Aptana.
All of a sudden, I am getting a type of whitespace marker showing in my Eclipse Editor. I must have accidentally hit a key combination.
Here is a screen dump.
I have already tried "General > Editors > Text Editors > Show whitespace characters" and it is not this. I already have show whitespace characters turned off. If I turn it on, then the Whitespace Characters display over the top of what I am already seeing.
Can anyone tell me how this can be turned off? Most annoying.
Many Thanks
It's under Preferences -> General -> Editors -> Text Editors
Just uncheck 'Show Whitespace Characters':
Did you try Restarting Eclipse? If that didn't work, you might try this http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.faqs/ka11640.html which explains which file to delete to force eclipse to revert to use default settings.
I have done this several times by accidentally hitting some keystrokes.
If you go to Windows/Preferences/General/Keys you will see all the keyboard shortcuts you have.
Mine is set to Control + .
(that's a period by the way) I had to place my cursor inside the document and do it a couple of times to make it work because there is also a keyboard shortcut for Control +
On a Mac it is Cmd +.
Hope that helps.
It's possible to modify Fortify Eclipse color schema?
I have found some files at this path
C:\Users\<user>\AppData\Local\Fortify\workspace\
that looks like the one used by Eclipse to define the color of the code but can't come with a way to successful modify them.
UPDATE: Fortify version is "Audit Workbench 3.50". It uses Eclipse code editor to display code but it isn't a Eclipse plug-in. I have discovered that they use the same files Eclipse does to customize look and feel but didn't manage to modify them successfully.
If you press Ctrl+Shift+L twice (where Ctrl=Cmd for Mac), a preferences dialog appears that allows some changes to the Eclipse UI properties in the Audit Workbench perspective.
For Java projects, go to Java -> Editor -> Syntax Coloring on
the left and select how java keywords are highlighted selecting
Element: Java -> Keywords excluding 'return'
There's similar preference for C++ projects under C/C++ ->
Editor -> Syntax Coloring.
Some colors can be set on Java (or C/C++) -> Editor page itself (like
matching brackets highlight color). Note, it uses the simplified
java editor, so complicated things like static fields and some others
will not work.
To set current line highlight color, go to General ->
Editors -> Text Editors and select 'Current line highlight' color.
Go to General -> Appearance -> Colors and Fonts, to play with other
elements' look and feel.
Not all of the color preferences in that dialog will work because there are some hard-coded backgrounds in some of the widgets.
As always, Your Mileage May Vary!
What version of Eclipse is it? Is the Fortify software a plugin of some type in Eclipse?
I've never used the HP Fortify software before, but I'll start with the obvious to change text appearance in eclipse: Preferences -> General -> Editors -> Text Editors -> Wiki Text -> Appearance.
I'm taking a guess that there may be some similar options under a plugin if it got added to Eclipse.
I tried using the Toggle mark occurrences (Alt + Shift + O) button and also in Preferences -> General -> Editors -> Text Editor -> Annotations and setting the C/C++ Occurrences and C/C++ Write occurrences. But still when I select a word it won't highlight all occurrences of that specific word.
What I am using is Eclipse Indigo Service Release 2 in XP, with a C++ project.
You can try to activate Toggle Mark Occurrences with icon on Toolbar:
Preferences --> Java --> Editor --> Mark Occurrences
In General > Editors > Text Editors > Annotations
Check out options that are checked in Preferences -> Java -> Editor -> Mark occurrences. Then restart Eclipse.
Find the Preferences under Window,
In General > Editors > Text Editors > Annotations(1)
(5) is to select the color and press apply.
The standard "Mark Occurrences" functionality included in Eclipse that everyone recommends only highlights identifiers in editors of whatever language. For example, it won't highlight int in C editors, and it won't help at all in the Console pane.
So if you want to highlight ALL occurrences on ANY word in ANY Eclipse pane (kinda like Notepad++ does), try the Glance plug-in for Eclipse.
As of November 2017 Glance works for Eclipse Neon and Oxygen. There was a period of time in which Neon was unsupported, and a fork appeared, but it seems unnecessary now (and abandoned).
There are two ways to highlight all occurences. First is using Eclipse options, which is not very reliable, because in many versions of Eclipse it is not supported.
Second is using a plugin called Glance which is available in Eclipse marketplace. This is supereasy and effective.
First Method
In the toolbar, there is button for Toggling Mark Occurrences. So, once you selected the text/word whose occurences you wish to highlight, then click this toggle button.
Let's say this step doesn't work for you. Then, Follow this step:
Goto: Window ==> Preferences ==> General ==> Editors ==> Text Editors ==> Annotations ==> On right Annotations types box: Occurrences ==> Select all check boxes.
You can also go to Window ==> Preferences ==> Java ==> Editor==> Mark Occurrences ==> Check all the checkboxes.
Restart Eclipse and check if highlighting works.
If still doesn't work, then Go to Second Method
Second Method
From Eclipse marketplace, install Glance. Once installed, restart Eclipse.
Now select any word in your eclipse editor
Move focus to component where you want to search
Open Glance using Ctrl + Cmd + F shortcut on Mac or Ctrl + Alt + F on other platforms
Enter text you want to search
Use Enter or **Shift + Enter** to find next/previous match
Close search box using Esc
You can also customize Glance from Window ==> Preferences ==> Glance
For Eclipse Mars:
Window --> Preferences --> Check (Mark occurrences of the selected element in the current file.)
As shown if figure:
Go
Java> Editor > Mark Occurrences
Uncheck "Keep Marks when the section changes" then click Ok
Restart Eclipse.
This work for me.
If you go into the window-prefrences, select the language you want/are working with. Select the editor under this specific language and then there is a mark occurrences there that has some options. Where it says keep marks when the selection changes, for me this was checked. When I unchecked it the system started highlighting correctly.
For folks who are using a dark background with light font colors, you may want to check out the highlight color in Preferences -> General -> Editors -> Text Editor -> Annotations. Mine was defaulted to black, which does not stand out on a black background.
Glance does not work anymore, but in current Eclipse Versions (Eclipse 2020) you can
highlight any word by selecting the word and pressing CTRL+F. The word is now highlighted. In the small search input, you can toggle 'match whole word' and case sensitivity.
I'd like to complement the other answers - which work in Java editor only or require plugins - with a way to highlight all occurrences of any text (not just a word or identifier) in any editor of text files (e.g. SQL, CSV, HTML, TXT, Java, etc ...).
There is a standard/built in command called Find Text in File (under Window -> Preferences -> Keys)
By default it has no keyboard shortcut assigned. Simply give it a shortcut (e.g. Ctrl+Alt+S) select some text (not necessarily a word) and it will find and highlight all occurrences of that selected text.
It can also be invoked from the menu as Search -> Text -> File.
Enjoy 🙂
Click the word and hold until a popup appears as shown in the figure.
On the popup, there is a little right arrow, after clicking it, a new icon shows up.
Click that link to open preferences.
Once in preferences, select C/C++ Occurrences (it will be language specific) and select Include in next/previous navigation with Text as Highlighted.
This should enable the feature of highlighting all occurences of the selected word in the opened file.
Some of my Javascript lines of code are longer than the editor window view. I have recently upgraded to the Helios version of Eclipse and noticed that after editing one of these long lines (I am scrolled to the right), after a few seconds the editor window will automatically scroll back to the left to the beginning of the line. It breaks my concentration and it's so annoying!
Does anyone know how to stop this behavior? I've searched around and haven't been able to find anything other than others being annoyed by this same issue!
I am not willing to turn on word wrap and wrap my lines :).
I was having the same issue and found these open bugs for it on the Eclipse Bugs.
No sign there of having a fix for it, but you can prevent it from happening when you switch the Code Folding off and reload the file.
For java in eclipse :
Windows -> Preferences -> Java ->Editors ->Folding -> Enable Folding (uncheck)
For HTML, JSP, XML etc in eclispe :
Windows -> Preferences -> General -> Editors -> Structured Text Editors -> Enable Folding (uncheck)
If you're using Mac OSX, press OPTION + COMMAND + O to turn off "Toggle Mark Occurrences" - it looks like a highlighter in the toolbar.
I turned off Toggle Breadcrumb, and it fixed my problem.