I'm using vim for C programming and I have a question about jumping to the next/previous character. I can use f or F to jump to the next or previous character correspondingly. But this does not work with multiline.

The problem I'm trying to solve is to jump to the previous { or next } to quickly get to the function signature I'm currently looking at.

  • 1
    If you are specifically interested in moving to { and }, this would be [[ and ][. Have a look at :h 29.3, paragraph MOVING IN CODE BLOCKS. Also this answer by me gives some more context about them.
    – Hotschke
    Nov 18 '18 at 8:53
  • If you want that fFtT are not restricted to the current line, there are several plugins which provide this and additional functionality: vim-fanfingtastic, improvedft, vim-extended-ft, clever-f.vim and probably more.
    – Hotschke
    Nov 18 '18 at 9:02
  • Some other popular plugins related to moving across lines without using /? are easymotion and vim-sneak.
    – Hotschke
    Nov 18 '18 at 9:06
  • @Hotschke Very cool, thanks. Works exactly as desired!
    – St.Antario
    Nov 18 '18 at 9:06
  • You are welcome. However, your actual question is a duplicate of vi.stackexchange.com/questions/8221/…. Your title is an XY problem even though it is a valid request. Your actual movement question is about moving to the beginning and end of a C function which you wisely added to the body of the question. But also the question asked in the title exists already: vi.stackexchange.com/questions/4486/…. Therefore I am in favour of marking this question as a duplicate.
    – Hotschke
    Nov 18 '18 at 9:18

Browse other questions tagged or ask your own question.