ternjs / tern_for_sublime

Sublime Text package adding Tern support
MIT License
803 stars 54 forks source link

command/keybinding to only select the next occurence #166

Open derhuerst opened 6 years ago

derhuerst commented 6 years ago

Hey! I just tried out Sublime + tern and it works fine so far. 😄

I wondered if it would be possible to add a command to only select the next occurrence of an identifier/variable, similar (but smarter) to what cmd+D does right now. I can see that the current "select all refs" command just loops all results coming from the tern server.

Afaict the code would have to loop the results until it reaches one after the current (last) selection, select this and abort a loop. I'd be willing to make a PR, although I'm a Python newbie.

marijnh commented 6 years ago

That does sound like it'd conform nicely with other ST functionality. So sure, a PR would be great.