hmatsuda / ruby-block

highlight matching ruby block on Atom editor
https://atom.io/packages/ruby-block
GNU General Public License v2.0
16 stars 11 forks source link

Go to matching block shortcut doesn't work: #20

Closed BitBrit closed 9 years ago

BitBrit commented 9 years ago

On the package page there is:

"Go to matching line (ctrl-g b)"

ctrl-g brings up the goto menu. This menu only allows numbers to be typed (0 - 9) so I am not able to use this shortcut feature which says I should type 'b'.

Is there something else I am meant to have done to be able to use this? If so, what? And, could these extra steps be added to the info page.

hmatsuda commented 9 years ago

@BitBrit Thanks for reporting. This package doesn't support jumping from block start to block end. When your cursor points to def func, ctrl-g b doesn't work, but your cursor points to end, it works well.

def func
  return true
end

In the future, I'll implement jumping from block start to block end. sorry for inconvenient. Thanks.

BitBrit commented 9 years ago

@hmatsuda Thanks for the quick response.

I found out how to use it and it requires some special timing! :-)

If I press ctrl-g, wait for a second and then press 'b', it doesn't work. This is because after the second the go-to box has appeared and it doesn't accept letters so pressing 'b' does nothing.

But, if I press ctrl-g and then press 'b' quickly, before the go-to box appears, then it works.

I wonder if it's worth describing this in your docs?

hmatsuda commented 9 years ago

@BitBrit Thanks for good advice! I've updated README. https://github.com/hmatsuda/ruby-block/commit/c420a06b458ac51daa1323d1969b9c9ea0b461e2