Skip to content
Discussion options

You must be logged in to vote

There is move_cursor(). It is also used for goto_xxx mappings. For example, g]) goes to the right ). With 'cover' search method (either global or set directly in MiniAi.move_cursor() call inside custom mappings) it will not go to the next ) textobject which can be used to imitate %.

Alternatively, there is a slightly more low-level find_textobject() which can be used to decide where to put cursor.

A more %-like alternative is find or find_left actions from 'mini.surround'. Pressing sf) multiple times will act like % when traversing expression in parenthesis. Note, that it will possibly traverse through four cursor positions of surrounding (left start - left end - right start - right end).


Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@231tr0n
Comment options

Answer selected by echasnovski
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested mini.surround mini.ai
2 participants