Vim: Moving Code

I want to be able to move the cursor through functions using Vim. Basically, I want the command to let me go to the next function, for example, } let me go to the next paragraph. I found this:

Go to end of C ++ function in Vim

Unfortunately, JavaScript does not work in JavaScript. Also, I believe that this would also not work for Python, since Python is not heavily dependent on {and}.

Any help?

+8
javascript python vim
source share
1 answer

In the Python file, I find:

  • } will lead me to the end of the block,
  • ]] will lead me to the start of the next function.
  • [[ returns me to the beginning of the current function, or higher if I keep pressing.

]} doesn't seem to work.

+8
source share

Source: https://habr.com/ru/post/651433/


All Articles