ziontee113 / syntax-tree-surfer

A plugin for Neovim that helps you surf through your document and move elements around using the nvim-treesitter API.
MIT License
472 stars 10 forks source link

Is it possible to jump to the next sibling from normal mode? #7

Closed elmehalawi closed 2 years ago

elmehalawi commented 2 years ago

I love jumping around using this plugin with vn but sometimes it selects a node that is longer than the screen, and I can't see the top of it, which is where the definition is. Also, I would prefer to be in normal mode after finishing jumping so it's easier to go and edit things.

Is this something in the cards, or is it out of scope?

ziontee113 commented 2 years ago

It is in the cards. Back then when I was making this plugin I didn't think about jumping around in normal mode. I should be able to add this feature when I get back from my break.

elmehalawi commented 2 years ago

That sounds great, really looking forward to it.

Really appreciate your work :)

ziontee113 commented 2 years ago

Hi @elmehalawi , sorry for the delay :)

Now you can use these commands: STSJumpToStartOfCurrentNode and STSJumpToEndOfCurrentNode.

Also if you use vn, and it jumps you to the end of the node, you can press o to jump to the beginning of the selection.

elmehalawi commented 2 years ago

@ziontee113 Thank you so much for this :)