xolox / vim-lua-ftplugin

Lua file type plug-in for the Vim text editor
http://peterodding.com/code/vim/lua-ftplugin
187 stars 27 forks source link

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

Open Oberon00 opened 7 years ago

Oberon00 commented 7 years ago

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

idbrii commented 6 years ago

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!