Skip to content

how to implement textobject all pairs similar to targets in mini.ai? #1172

Closed Answered by echasnovski
zoomlin asked this question in Q&A
Discussion options

You must be logged in to vote

Try this one:

require('mini.ai').setup({
  custom_textobjects = {
    ['@'] = { { '%b()', '%b[]', '%b{}', '%b""', "%b''", '%b``' }, '^.().*().$' },
  },
})

This looks fairly similar to the first example from the link. And 'mini.ai' allows balanced pattern for same left and right characters.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@echasnovski
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
2 participants