All Questions
Tagged with java indentation
8 questions
0
votes
1
answer
56
views
How to change java file behaviour to use 2 character indentation
If I create a C file I get 2 character indentation which is what I want. However, if I create a java file, eg Hello.java then I am getting 4 character indentation. And I can't work out why.
My ....
1
vote
1
answer
172
views
How to set up K&R everywhere (1TBS) brace style in cc-mode?
I'd like Emacs to follow this indentation style:
struct Foo {
void bar() {
for (int i=0; i<10; i++) {
if (condition) {
// code
// code
...
2
votes
1
answer
370
views
How to have c-offset style correctly detect a Java constructor and change indentation?
Currently my team (non-Emacs users) indent java like so:
public DiskThresholdDecider(Settings settings,
NodeSettingsService nodeSettingsService,
...
5
votes
2
answers
1k
views
Make emacs format Java more consistently
When I open Java files originally created and edited in Emacs, the indentation shows up correctly, as in the image below:
However, when I open the same file in Sublime Text, or any other editor ...
1
vote
1
answer
1k
views
How to have emacs format/indent javadoc comments correctly?
Very new to emacs. (I only started day before yesterday.) I'm writing some Java and was wondering if there's an option or something I can set up so it will indent Javadoc comments correctly.
What I ...
3
votes
1
answer
787
views
Modifying Java indentation style
I use Emacs for Android development and this has been bugging me lately.
I'm trying to get the following indentation behaviour:
submitBtn.setOnClickListener(new OnClickListener() {
@Override
...
5
votes
1
answer
286
views
Get Emacs to indent fluent builder inside argument list
So emacs's java-mode handles indenting continued method invocations at the function body level out of the box, but it doesn't seem to handle them inside of an argument list. I'd like to override this ...
5
votes
1
answer
746
views
How to configure specific Java indentation?
I have the following code from Intellij's indentation:
public static String[] defaultMethodBlacklist = new String[]{
"getClass",
"wait",
"notify",
"notifyAll",
...