1

I'm using bracket a lot and I'm trying to quickly circle through the bracket in both back and forth with the following mapping:

nnoremap 0 f)
nnoremap 9 F(

Unfortunately, it does not work. Any solution? Thanks.

5
  • 3
    Welcome to Vi and Vim! How does it not work? Can you give an example of a sample line of text, where the cursor is, what you pressed, what you expected to happen and what actually happened?
    – filbranden
    Jul 16, 2021 at 19:52
  • 6
    When I think of cycling through brackets I think of the % command. That jumps back and forth between a pair of parens/braces/etc. That doesn't do what you want? Then perhaps you mean that PLUS being able to jump to the next/previous pair...?
    – B Layer
    Jul 16, 2021 at 22:06
  • 2
    Digits are normally used as "repeat counter". You should never remap them.
    – Matt
    Jul 17, 2021 at 7:15
  • 1
    It works for me if I try it; as filbranden said: we need a bit more information on your actual issue here. Jul 18, 2021 at 16:24
  • My guess is that the the issue is that f) doesn't go to the next line so what OP is looking for is probably a search like /) and then n and N. @logbasex you might also be interested in :h ; and :h ,. But until you edit the question with more details I'll also be voting to close the question as unclear.
    – statox
    Jul 30, 2021 at 11:02

0

Browse other questions tagged or ask your own question.