Vim icon indicating copy to clipboard operation
Vim copied to clipboard

Support for '%' jump between multi-character keywords

Open TheCrether opened this issue 1 year ago • 2 comments

Is your feature request related to a problem? Please describe. Hello! I've been using VSCodeVim for some time and (re-)discovered the % jump. Since I am programming in Magik (programming language from GE) for work, I wanted to configure jumping between their keywords for methods, blocks etc. The problem is, is that the keywords consist of words (like _method/_endmethod or _loop/_endloop)

Describe the solution you'd like If it is possible that the matchpairs supports this it would be amazing but I think that standard Vim does not support multiple characters for matchpairs, so I'm not sure it would be a great solution.

Describe alternatives you've considered I don't know how much effort it is to add optional plugins to VSCodeVim but I've found a Vim plugin that apparently supports this: https://github.com/tmhedberg/matchit

Additional context Example code for testing if this gets implemented:

_method test.test(param) # start of method
  ## some code
  _local v << {1, 2, 3}
  _for item _over f.fast_elements()
  _loop # start of loop block
    show(item)
  _endloop # end of loop block

  _if v.size = 3
  _then # start of if block
    write("wow")
  _endif # end of if block
_endmethod # end of method

TheCrether avatar Mar 21 '24 08:03 TheCrether

This would similarly be useful for languages like Ruby/Elixir that use do and end

def function_name do
  IO.puts("Hello!")
end

zolrath avatar Apr 24 '24 19:04 zolrath