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 line doesn't work when this package is enabled. #21

Open codemanmeet opened 8 years ago

codemanmeet commented 8 years ago

When this package is installed the following happens -

When I press Control + G the go to line minibar doesn't pop up on the first time. It pops up on the second time I press the keyboard shortcut. After that, when I enter the line number, instead going to that line, the cursor moves to the editor and that number is just typed in the editor. In the gif shown below, it can be seen that when I typed 4 in the line input bar, 4 just ended up in the first line of the editor screen where my cursor was before.

atom-bug

Go-to-line works well with atom --safe so the problem is not with Atom's package as confirmed by one of its developers in the following issue as well -

https://github.com/atom/go-to-line/issues/30

blimmer commented 8 years ago

Can confirm - was driving me crazy

rafalskyi commented 7 years ago

i have the same problem

ChrisBr commented 6 years ago

Same here. Maybe https://github.com/hmatsuda/ruby-block/blob/master/keymaps/ruby-block.cson#L11 is causing it?

ChrisBr commented 6 years ago

Commenting https://github.com/hmatsuda/ruby-block/blob/master/keymaps/ruby-block.cson#L11 this line resolved the issue for me.

garrettgsb commented 6 years ago

Same-- In my case, I had to comment the line above, too (essentially commenting out the whole file).

For posterity, ~/.atom/packages/ruby-block/keymaps/ruby-block.cson is where I found this file on my system. Open that (with atom is fine), and comment out lines 10 and 11. My file looks like this now:

# Keybindings require three things to be fully defined: A selector that is
# matched against the focused element, the keystroke and the command to
# execute.
#
# Below is a basic keybinding which registers on all platforms by applying to
# the root workspace element.

# For more detailed documentation see
# https://atom.io/docs/latest/advanced/keymaps
# 'atom-text-editor[data-grammar~="ruby"]:not([mini])':
  # 'ctrl-g b': 'ruby-block:go-to-matching-line'