1

I am editing a java file.

]m takes me from one class to the next, instead of to the next method definition.

How do I get it to take me between methods?

Example:

public class Baz {
    public class Foo {
        public Foo() {
        }

        public void doFooOne() {
        }

        public void doFooTwo() {
        }
    }

    public class Bar {
        public Bar() {
        }

        public void doBarOne() {
        }

        public void doBarTwo() {
        }
    }
}

Putting cursor on doFooOne and typing ]m jumps the cursor to public class Bar { instead of to doFooTwo.

  • Could you add a code snippet to illustrate the behaviour? – Hotschke Nov 22 '18 at 16:01
  • 1
    I feel like there’s a question about this already on this site (might be about C++ functions within a namespace block) but I can’t find it now. – Rich Nov 22 '18 at 18:33
  • @Rich well the problem seems to do with nesting, so the C++ functions being inside a namespace block may have the same issue. – theonlygusti Nov 22 '18 at 18:36
  • 1
    I guess this is the corresponding bug – Christian Brabandt Nov 23 '18 at 7:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.