t9md / atom-cursor-history

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

Separate cursor histories per pane? #34

Open synthetiv opened 7 years ago

synthetiv commented 7 years ago

Hi there – first, thank you for all your work on this, vim-mode-plus, and your other packages. They're amazing, especially for vim heads like myself.

There's one way in which this package's behavior differs from Vim's jumplist: whereas this package maintains only one global 'jumplist', Vim maintains separate jumplists for each of its windows. In Vim, if you split a window, the jumplist of the original window gets copied, but then their histories can then diverge. So once a window is split, you can follow tags, open other buffers, etc. in one window without affecting the jumplist of the other window. Apparently I've become quite used to that behavior, so the way atom-cursor-history behaves sometimes trips me up.

Would you consider adding a feature to support separate cursor histories for each pane, or is that outside the scope of what you're looking to do with this package?

t9md commented 7 years ago

Thanks, and I understand your request, I haven't noticed that detailed nuance for jumplist. I think it's useful, but I don't want to implement it in this package. This is just for keeping implementation simple.

There is no window equivalent role in Atom. Atom have editor/buffer/pane, vim's window is pane+editor but it's not same, so I cannot bring Vim's implementation strategy directly into atom-cursor-history.

t9md commented 7 years ago

I'll keep open. Will try to find how I can improve with your hint.

johnjcamilleri commented 6 years ago

Thanks for the great plugin! I would also like to request extending this functionality to having one history per tab. I most often want to navigate through the cursor history within the same file tab, and it can be a bit annoying to jump to some other file.

t9md commented 6 years ago

@johnjcamilleri When you say @tab, are you referring a file? If so, have you tried cursor-history:next-within-editor and cursor-history:prev-within-editor command?

johnjcamilleri commented 6 years ago

@t9md d'oh, sorry I missed that 😳 That's exactly what I was after, thanks.