Vim Recall繁體中文

Move forward to the start of a method in Java-like code

]m

Example

Normal 0 / 1
class Demo {
  void first() {
    one;
  }
  void next() {
    two;
  }
}
Cursor on line 3, column 5

Move forward to the start of a method in Java-like code.

Before & after
Before
class Demo {
  void first() {
    one;
  }
  void next() {
    two;
  }
}
Cursor on line 3, column 5
After
class Demo {
  void first() {
    one;
  }
  void next() {
    two;
  }
}
Cursor on line 5, column 15

Start in Normal mode. Java-like methods are enclosed by a class brace pair. Start inside the displayed method body.

Details & Vim help

Example replayed in Vim

Move forward to the start of a method in Java-like code. Use in Normal mode. Availability and exact behavior can depend on Vim build features, options, mappings and editor state; the linked help is authoritative.