VIM Adventures: learn vim while playing

vim_compFor guys who work on Linux but find vim to be too intimidating, there’s a better way to learn vim – through a game which has many levels; thanks to VIM Adventures!

The amazing thing about vim is that you keep learning more and more fascinating features of it. Even after using vim for many years, yesterday I learnt from another vim enthusiast that there is a shortcut to jump to just the upper or lower curly braces from any point in the code.

  • [[ moves the cursor to the starting curly bracket { of the function starting above current position.
  • ]] moves the cursor to the starting curly bracket of the function starting below current position.
  • [{ moves the cursor to the start of the current scope [starting curly bracket {].
  • ]} moves the cursor to the end of the current scope [closing curly bracket }].
  • To copy a whole function press [[ (to jump to the starting braces) followed by ya{. Remember that if your function signature starts in the line above curly braces, you need to copy that separately.

Webpage: VIM Adventures

Comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s