Skip to content

Conversation

Konfekt
Copy link
Contributor

@Konfekt Konfekt commented Mar 25, 2025

Similar to [m,]m which correspond to [[,]] in C for bigger leaps

Similar to [m,]m which correspond to [[,]] in C for bigger leaps
@zzzyxwvut
Copy link
Owner

Aren't we already better off with context-aware motion from
relying on syntax item folding and making use of &foldcolumn
with &relativenumber for any counted [z etc.? The default
[m[{ motion can also move the cursor out of a method's body
and towards the beginning of its enclosing type header.

Any of ‘class’, ‘interface’, or ‘enum’ is not uncommon in
Javadoc comments ; ‘record’ is a valid name for a variable
or a method. For example, try traversing the source files
of java.lang.String and java.lang.Object from their top
lines with the proposed mapping ]}.

@Konfekt
Copy link
Contributor Author

Konfekt commented Mar 26, 2025

[z

and

Any of ‘class’, ‘interface’, or ‘enum’ is not uncommon in Javadoc comments ; ‘record’ is a valid name for a variable or a method.

Since syntax and folding is optional, these mappings could be overridden in case syntax and folding is enabled. Without these, it will become cumbersome to write a reliable mapping.

The default [m[{ motion can also move the cursor out of a method's body and towards the beginning of its enclosing type header.

I was not aware of this combination. What's the counterpart to it to move to the next (instead of previous) class?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants