In Eclipse, Is there a way to change the 15 character limit on the open file names displayed in the editor tabs? - eclipse

The source code I'm working with has many files where the first 15 characters of a file name are the same. When multiple files are open in Eclipse the tabs all look the same. I have searched online and not come up with any answers, including a vague reference on this site, where someone asked a similar question, but the suggestions more had to do with configuring the number of tabs, not the number of characters in the file name appearing on the tab.
As far as I can tell, the ability to configure this does not seem to appear in Preferences for Eclipse; but then again, I'm relatively new to it. I would like to have wider tabs, displaying the unique portion of the file name.

No this can't be changed using a preference.
The width seems to be hard coded in the stack rendering code (org.eclipse.e4.ui.workbench.renderers.sw.StackRenderer) so it would require a custom renderer to change.

Related

Visual Studio Code explorer view scrolling

My project contains a LOT of folders, many of which I routinely have open, making for a lengthy explorer view. I find scrolling this view quite frustrating for two reasons:
There is no equivalent of the editor.mouseWheelScrollSensitivity setting for the explorer view. I'm also generally happy with the scroll speed for my mouse in other applications, so don't want to go messing with a system wide setting to compensate for VSC.
The scrollbar is frustratingly difficult to grab at and requires precise mouse placement. The number of times I accidentally grab at the slider and resize the view rather than scroll it is ridiculous.
I've found no useful extension to help in this matter. Has anybody any suggestions? I'll raise an enhancement request in Github if necessary.
Here are 2 shortcuts that can speed up navigation between files:
With Ctrl then Tab you can browse a history of your last viewed files. Great for switching around when working on multiple files.
With Ctrl+P (Go to File... command) you can quickly go to a file by name. You can also search for files inside folders like this: folder/subfolder/file.ext. This is great if you know what you are looking for.
Source and more navigation tips: https://code.visualstudio.com/docs/editor/editingevolved#_quick-file-navigation
This PR in vscode 1.59 may have fixed this issue: https://github.com/microsoft/vscode/pull/110059/commits/61efc577e038ac772f12511fb823de27296dbc69
New settings:
workbench.list.mouseWheelScrollSensitivity
workbench.list.fastScrollSensitivity

Change width of Eclipse filename tabs

In Eclipse, is it possible to adjust the width of the filename tabs across the top of the open file? At the moment each tab shows only the first 12 characters of a filename. As java class names are usually quite long, this isn't enough to distinguish the files eg:
ExistingCustomer.java
ExistingCustomerService.java
ExistingCustomerController.java
Becomes:
ExistingCust...
ExistingCust...
ExistingCust...
Sorry but I think this is not possible out of the box. Maybe there are plugins that can achieve this but I'm not aware of any standard eclipse setting serving this purpose.
I know that eclipse tries to display as much as possible of each file's name but if you open too many files at the same time, the part control has to trim the size of the part taps in order to display some more.
If you find the corresponding setting or a plugin for the intended behavior, please let me know ;)

Multiple editor windows with multiple tabs

Very often I work with multiple projects in MATLAB and have a group of files for each project that I access at one time. Having all files of all projects open causes a lot of clutter in the workspace. One can do this for one single set of files by docking which is well known.
Is there a way to tab projects, or have multiple MATLAB editors (for each project) open with multiple tabs in each (with the projects files). The question can be found here too. In the same vein, are there other code editors which can be used to perform the same?
Project1
file 1.m
file 2.m
file 3.m
file 4.m
Project2
file 1.m
file 2.m
file 3.m
file 4.m
Either in the same window, or in different windows.
Unfortunately I don't believe MATLAB can do that kind of project/file management for you, which is why I use Sublime Text 2. It's perfect for that kind of project/file management... and not to mention the awesome shortcuts and quick editing tools to help you code faster.
Check them out: http://www.sublimetext.com/. The one drawback is that it's nagware. It is free to use, provided you can bare the popups to buy a copy of the software every now and then. Once you buy it, the popups go away. Give it a try and see how it goes!
If someone still need a solution for that-
You can just drag a tab of one file to the side, or bottom of the space of the editor, like that:
And the result will be:
Now you can drag in the same way other tabs to the new tabs group, and you have two separate tabs groups (but one Editor window..). You can of course drag the middle edge line to the right-end, and work fully only with the first group, or drag it to the left-end and work fully with the second one.
Note for one drawback here- if the line is in one of the ends, you don't see the tabs status and files names of the hidden group, and if you forget that you opened some file there and try to open it again, you will not see it opened, or any change in the IDE, because the control goes to the already opened tab but you not see it.

Eclipse PDT Differentiating file name tabs for MVC?

When working with MVC in Eclipse you might often have a model, view, and controller all with the same name open at the same time. When looking at each of the file tabs, you won't always know which is which and have to click through them, which can be quite a hassle sometimes. I've heard of being able to color code files based on the path in some editors. For example, tabs with path model could be set as green, path controller set as yellow, etc. Is this possible in Eclipse, or is there a plugin for something like this? If not, what do you do to more easily differentiate between the tabs? I've heard of people always opening a MVC set in a certain order. So you'll know the leftmost tab is the controller, the right most is the view, etc. However, that must also mean you need to open all 3 files each time. Any better tips or tricks?
Another thing about the file tabs that can be annoying is that when you have more files that can't fit in one line, eclipse pushes off to an arrow which you have to click to see the rest. It seems to be random which tabs get pushed off there, maybe the least used ones, I have no idea... This coupled with the problem above gets kind of annoying. I was trying to find a way to disable this and just show tabs that can't fit in one line to show up on a second line, but surprisingly couldn't find such an option (then again you also can't wordwrap without a plugin).
Hopefully there are some solutions to these two problems. Thanks.
Maybe this can be helpful
http://www.dipherence.com/2011/03/20/full-coloured-eclipse-navigator-plug-in/
With the latest version of Eclipse (Kepler 4.3.1, build M20130911-1000) when two or more files with the same base name are opened, tab will show also the parent directory name.

Why is IntelliJ using autocomplete in a plain text file and how do I turn it off?

In trying to edit a 2300+ line .ini file Intellij is really slow, as in 1-2 seconds after keystroke before the letter appears. I see autocomplete popping up and I assume that's why its slow, but its a plain text file, why is it even giving me autocomplete?
And ok, its only registered as plain text because I haven't figured out how to get it to support hierarchical config files nicely, and autocomplete could be useful here, but it shouldn't be that slow.
Have you tried clicking the police icon in the right lower corner? Setting the "Highlighting Level" to None it speeds up most things when working with large files of any kind.