Skip to content

Conversation

Oberon00
Copy link

The new semantic is according to
http://learnvimscriptthehardway.stevelosh.com/chapters/50.html:

  • ]] jumps to the start of the next function,
  • ]] to the start of the previous function,
  • ][ to the end of the next function,
  • [] the end of the previous function.

The new semantic is according to
<http://learnvimscriptthehardway.stevelosh.com/chapters/50.html>:

- `]]` jumps to the start of the next function,
- `]]` to the start of the previous function,
- `][` to the end of the next function,
- `[]` the end of the previous function.
@idbrii
Copy link

idbrii commented Mar 12, 2018

This is much more consistent than the current implementation (which jumps to one function defined in a function but not to the second function defined in the same top-level function).

However, what I really want is to jump to the function in the same scope (if I'm in a subfunction, jump to the next subfunction. if in a top-level, skip past subfunctions). I attempted this in idbrii/vim-lua-ftplugin@0e12923 and a7c3606, but it doesn't work well.

Regardless, in my brief testing this PR is an improvement on the status quo!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants