简体   繁体   中英

In Eclipse, how do you change the foreground and background color in the default text editor for plain text files with no file extension?

In Eclipse for C/C++, how do you change the foreground and background color in the default text editor for plain text files, that is, files with no file extension?

I tried going to window > preferences > general > editors > text editors > appearance color options. Here it says foreground color and background color, and after hitting 'apply', the color of the text changes briefly, but returns to default as soon as you close the 'preferences' window.

The other thing I tried is to set file associations and try to set a different internal editor as the default for plain files. However it seems to only work for files that have an extension.

I often have to deal with existing files in a repository that are actually bash scripts, but the files have no extension. It is annoying then to not even be able to configure the settings of the editor. If I can't find a solution for this, it looks like I either have to 'embrace the suck' or use a different editor outside of Eclipse.

I'm working on Kubuntu 2020-04 with Eclipse 2020-06 and using the dark theme.

It looks like the same problem as here , but I couldn't find any satisfying solution. The problem was reported there on 2020-01-03, so it actually predates my Eclipse version.

Thanks to @howlger for suggesting to upgrade. After upgrading to Eclipse version 2020-12, the first method I mentioned in the question works, that is, going to window > preferences > general > editors > text editors > appearance color options. Here you can change the foreground color and background color and it will actually stay the color you selected.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM