Notepad++ has the ability to show some types of syntax (e.g. strings) in a different font from others.
Can Eclipse do something like this?
I need this ability because the strings have Unicode characters in them, but all the fonts that I have that support Unicode look crap in the rest of the code.
EDIT: I am looking for this feature for Java code.
Not currently possible, you can only change the font family for the entire Java editor.
it depends on which perspective .. I am using PyDev .. go to window-->preferences then select PyDev tab then select Editor ..you will find a panel titled with "Appearance color options" .. you can customize the color of each part of your codes
Related
Many editors and IDEs support converting spaces into tabs by using Tab/Shift+Tab on a line or a selected text fragment, but I've not found such a feature in Eclipse. Is there a plugin or something to add such functionality? I've tried to find one myself, but it doesn't seem to have any by keywords like "tab" or "indent". I'm working with Perl, BTW.
Check if the context menu has an entry like Source->Correct Indentation. That is available for Java, but the availability depends on the language you edit.
Otherwise you can install the AnyEdit Tools plugin which provides a command to convert the selection from tabs to spaces and vice versa.
If you change settings to tabs only or spaces only, Tab, Shift + Tab works as expected. (At least for me).
Scala allows to use the Unicode characters ← (\u2190) for <- and ⇒ (\u21D2) for =>
There are questions with answers on how to replace these characters (e.g. here and here) upon writing and even using post-processing (e.g. scala-style). These solutions however change the actual source-code. This means that if I'm using the Unicode style and my colleague isn't, we'll get a mix of styles in our source-code. Which in turn is something I dislike. (Meaning I'd rather use ASCII style arrows to prevent mixing styles.)
So I'm looking for a way to have a solution in the presentation-layer and not in representation. (like changing number-format using dot or comma for the decimal separator,.. it's not stored differently on disk.)
I'm aware that I could have Git do some funky stuff like it it does with line-endings for Windows, but I don't want to depend on Git for this. I just want IntelliJ (or Eclipse if someone knows how to fix it in Eclipse) to show me the Unicode arrows when it encounters the ASCII character version (preferably at the appropriate place, i.e. pattern-matching and for-comprehension).
Is this even possible in editors like IntelliJ and Eclipse? I'm willing to do some digging and writing plugins etc., but I'd rather not if it's not needed.
Since posting the question, IntelliJ has added native support to view arrows as if they are 1 character (called ligatures apparently).
From their whats new page:
We've added support for monospace font ligatures. To enable ligatures, go to Settings → Editor → Colors & Fonts → Font, choose a font that supports ligatures, e.g. FiraCode, Hasklig, Monoid or PragmataPro and select Enable font ligatures option.
If you want to see the lambdas as an arrow you can use the IDE settings.
I will go to IntelliJ Editor settings -> background, now enable the option "Enable ligatures".
I'm trying to switch to a "proper" IDE, but I just can't get past the terrible way it displays the font.
I'm using the Monaco Font in both sublimeText and Eclipse, both with a size of 9, regular.
Sublime looks like this:
Whereas Eclipse's rendering of the same font looks like this:
It's all semi-bold and smudgy looking! I notice that most of this is only for java keywords like, "public," "class," etc.. non keywords look fine. So, I'm guessing this is editable somewhere in Eclipse's many, many menus.
Does anyone know how to turn off the semi-bolding of keywords?
From the Window menu, choose Preferences. Then type "font" in the search field. You'll see the colors and fonts option that lets you adjust the appearance of several different languages, including Java. I assume you can remove the bold, although I didn't check the details.
The options described on this question may also be relevant.
Is it possible to change the default font in netbeans? The documentation says:
The font Monospaced is maped to different fonts on different systems.
On Windows it is mapped to "Courier ", on Linux it is mapped to
"Lucida Typewriter".
http://ui.netbeans.org/docs/ui/editor_fonts_colors/Editor_fonts_and_colors.htm
I'm on windows and want to map Monospaced font to 'Consolas' instead of 'Courier'.
P.S. I know that fonts can easily be changed from options, but when I change it in this way, I can no longer use unicode characters. Guess I need to do what they call 'mapping' the monospaced font to other font.
Tools > Options > Fonts and Colors
Set the category "Default", and to the right of that, the font you want to use.
If this does not fix it, try adding:
--laf Nimbus -J-Dswing.aatext=true -J-Dawt.useSystemAAFontSettings=lcd
or
-J-Dswing.aatext=true -J-Dawt.useSystemAAFontSettings=lcd --laf Metal
to the file : netbeans.conf. You can find it in $NETBEANS_HOME/etc/ folder. Make your application font smaller from system preferences.
To change the font size outside of the editor you can configure by editing the Net Beans conf file, you can find it here:
C:\Program Files\NetBeans 8.0.2\etc\netbeans.conf
Then edit this line:
netbeans_default_options="..."
by adding this at the end:
--fontsize 18
I hope it helps :-)
Life becomes more easier now. Just from Tools menu choose Options and then follow steps on the following screen shot and take care with step 3 and 4 which they are making the default font for all languages:
I have a NetBeans plugin called 'UI-Editor' which allows you to customize virtually any Swing property, including font sizes, colors, and types. Go to Tools->Plugins and search for 'UI-Editor' or go here: http://plugins.netbeans.org/plugin/55618/?show=true
also don't not forget to change the font to the one that support Arabic like Arial for example i am not sure of some one mention that i just tried it
As far as I can tell there's no way to do this. jEdit (http://jedit.org) also uses Swing and DOES do font substitution for all fonts - there's a "automatic font substitution" checkbox in Global Options > Text Area, along with a list of preferred fonts. But jEdit is otherwise not as capable as Netbeans.
Hi all I was wondering if it is possible for eclipse to stop "italizing" the words in the editor?
These are my settings for General >> Appearance >> Colors and Fonts:
I've selected "Regular" style, however in eclipse it shows as this:
as can be seen, the BEST_DISPLAY_MODES and getBestDisplayMode are italized. Is there anyway to change that font to "regular" font?
To change the settings for Java syntax highlighting (and similarly for other languages) got to Window->Preferences. From there expand Java->Editor->Syntax Coloring. There you will see options for colors and styles for each type of token that is colorized/styled. You should be able to fix it there.