t9md / atom-cursor-history

Cursor position history manager
https://atom.io/packages/cursor-history
MIT License
59 stars 7 forks source link

cursor-history:next won't work #42

Closed exalted closed 6 years ago

exalted commented 6 years ago

Hey there!

First of all, thanks for this great package… 🙏

Whenever I can easily jump backwards with cursor-history:prev (mapped to ctrl--), but then it seems cursor-history:next won't work (mapped to ctrl-shift--). The issue doesn't seem to be realted to keymapping, because even calling cursor-history:next from the command palette won't work.

Here's how I expect this to work:

A-B-C  <prev>  A-B-C  <prev>  A-B-C  <next>  A-B-C  <prev>  A-B-C
    ^            ^            ^                ^            ^

Regardless of the right-most <prev> in the illustration above, the only <next> in there, won't actually move it to B, but the cursor will stay at A 😞 .

Any ideas?

Using Atom 1.21.1 and cursor-history 0.12.0 with the following keymap:

'atom-workspace':
  'ctrl--': 'cursor-history:prev'
  'ctrl-shift--': 'cursor-history:next'
  'ctrl-alt--': 'cursor-history:prev-within-editor'
  'ctrl-alt-shift--': 'cursor-history:next-within-editor'
exalted commented 6 years ago

I am going to reply to myself here, and it seems silly of me, but I guess the problem actually was that ctrl-shift-- is actually ctrl-_ for Atom (makes sense).

So, when I changed my binding like this, it all works:

'atom-workspace':
  'ctrl--': 'cursor-history:prev'
  'ctrl-_': 'cursor-history:next'
  'ctrl-alt--': 'cursor-history:prev-within-editor'
  'ctrl-alt-_': 'cursor-history:next-within-editor'

🤷‍♂️