开发者

Vim : Moving Through Code

开发者 https://www.devze.com 2023-02-06 15:07 出处:网络
I want to be able to navigate the cursor across functions using Vim. Mainly, I want a command to allow me to go to the next function, like } allows me to go to the next paragraph. I found this:

I want to be able to navigate the cursor across functions using Vim. Mainly, I want a command to allow me to go to the next function, like } allows me to go to the next paragraph. I found this:

Go to the end of the开发者_JAVA百科 C++ function in Vim

Unfortunately, it doesn't seem to work fine in JavaScript. Also, I believe it would also not work for Python, as Python don't depend much on { and }.

Any help?


In a Python file I find:

  • } will take me to the end of a block,
  • ]] will take me to the start of the next function.
  • [[ takes me to the start of the current function, or the one above if I keep pressing.

]} didn't seem to work though.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号