Skip to content

Rewrite [[, ]], [], ][ implementation. #43

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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