vim-lua-ftplugin icon indicating copy to clipboard operation
vim-lua-ftplugin copied to clipboard

Rewrite [[, ]], [], ][ implementation.

Open Oberon00 opened this issue 9 years ago • 1 comments

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.

Oberon00 avatar Nov 14 '16 15:11 Oberon00

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!

idbrii avatar Mar 12 '18 19:03 idbrii