Implementation of ]m [M ]m ]M
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 15.2k
- Forks
- 1.5k
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 6
Description
Please implement these:
| ⬇️ | 🔢 [m | N times back to start of method (for Java or similar structured language) |
|---|---|---|
| ⬇️ | 🔢 [M | N times back to end of method (for Java or similar structured language) |
| ⬇️ | 🔢 ]m | N times forward to start of method (for Java or similar structured language) |
| ⬇️ | 🔢 ]M | N times forward to end of method (for Java or similar structured language) |
From vim help:
The above four commands assume that the file contains a class with methods.
The class definition is surrounded in { and }. Each method in the class is also surrounded with { and }. This applies to the Java language. The file looks like this:
// comment
class foo {
int method_one() {
body_one();
}
int method_two() {
body_two();
}
}
Starting with the cursor on body_two() using [m will jump to the { at the start of method_two() (obviously this is much more useful when the method is long!) .
Using 2[m will jump to the start of method_one().
Using 3[m will jump to the start of the class.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no source files or tests. Start by locating the TypeScript extension's existing motion and keybinding handling for [m, [M, ]m, and ]M, then compare its behavior with the linked Vim help. Done means the four commands support count-prefixed jumps to method or class boundaries as described.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100