If you are new to Eclipse IDE and wondering how to enable the line numbers for your code, you can do it in following steps,
- Go to the Gutter area of any file.
- Right Click → Show Line Numbers
- Now you should be able to see the line numbers.
Below are some screenshots that can help you guide to it.
![Enable line number eclipse Enable line number eclipse](https://code2care.org/pages/how-to-enable-line-numbers-in-eclipse/images/Enable line number eclipse.png)
Enable line number eclipse
![Line numbers visible Eclipse Line numbers visible Eclipse](https://code2care.org/pages/how-to-enable-line-numbers-in-eclipse/images/Line numbers visible Eclipse.png)
Line numbers visible Eclipse
Similarly if you want to disable line numbers Gutter → Right Click → Show line numbers
Alternate Option:You can do the same by using the menu options as well: Go to Windows → Preferences → General → Editors → Text Editors, now look for "Show line numbers" checkbox and tick it!
Eclipse Show Line Numbers using Window Menu Option
If you are using macOS you need to go to: Eclipse → Preferences → General → Editors → Text Editors → General → Editors → Text Editors
Note: ⛏️ This is no shortcut keys to do it!
Comments:
- Perfect! :) Worked.. Thanks
user2886 16 Jul 2020 14:07:03 GMT
- Further comments disabled!
More Posts related to Eclipse,
- How to show console in Eclipse IDE
- How to Configure GitHub with Eclipse IDE in 2023
- Fix: Eclipse Connection time out: github.com
- Java was started but returned exit code=13 [Eclipse]
- [Fix] Spring Tool Suite STS Code Autocomplete not working with Eclipse
- [Eclipse] Enable or Disable print margin line
- Eclipse Java: Multiple markers at this line error
- Java Decompiler Eclipse Plugin
- Compare Current and Previous Versions of Same File (Local History) in Eclipse
- Eclipse Error : The Eclipse executable launcher was unable to locate its companion shared library.
- Word-wrap Eclipse Console logs
- eclipse maven m2e : Cannot complete the install
- How to Save Eclipse console logs in external log file
- List of Code Snippets/Templates to Eclipse IDE
- How to Access Terminal (Command Line) in Eclipse IDE
- Installing JD Decompiler plugin in Eclipse IDE
- How to Reset Eclipse Theme to Classic
- Increase Font Size of Eclipse Java Code
- Eclipse: Updating Maven Project. Unsupported IClasspathEntry kind=4
- INVALID FILE NAME: MUST CONTAIN ONLY [a-z0-9_.] Android Eclipse Error
- Fix: Eclipse Cant Connect to any repository not Authorized Error GitHub
- [Eclipse] Syntax error, annotations are only available if source level is 1.5 or greater
- Add imports in eclipse shortcut key combinations
- Eclipse version 32-bit or 64-bit check on macOS
- How to create a Git Project in Eclipse (Step-by-step)
More Posts:
- Read a File Line By Line using Java 8 Stream API - Java
- How To Remove Only Conditional Formatting in Excel - Microsoft
- How to extract numbers as list from Python String - Python
- Java 8: Convert Iterator to Stream Examples - Java
- Fix [Fatal Error] :2:6: The processing instruction target matching [xX][mM][lL] is not allowed. - Java
- Terminal display next month Calendar - Linux
- Android Studio Error: Default Activity not found - Android-Studio
- Multiple Microsoft 365 Services Down (Outlook, Teams, SharePoint, OneDrive) - 25 January 2023 (Solved) - Microsoft