Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edit all in scope #6

Open
Crazor opened this issue Sep 3, 2017 · 3 comments
Open

Edit all in scope #6

Crazor opened this issue Sep 3, 2017 · 3 comments

Comments

@Crazor
Copy link

Crazor commented Sep 3, 2017

A nice feature would be a function akin to Xcode's "Edit all in scope". It basically allows you to rename a local variable throughout a function.

@wincent
Copy link
Owner

wincent commented Sep 6, 2017

This would be a neat feature but probably requires a level of context-sensitive (language-aware) intelligence that Scalpel doesn't (and isn't likely to) posses.

Still if somebody wanted to take a stab at implementing it I'd be open to the idea. Thanks for the suggestion. Will add some appropriate labels.

@Crazor
Copy link
Author

Crazor commented Sep 11, 2017

Well, at least Vim knows about methods, right? I can navigate sources with { and }. So maybe not a semantically perfect version like Xcode has, but one limited to the text object that { and } refer to?

@wincent
Copy link
Owner

wincent commented Sep 11, 2017

{ and } are just jumping to the previous/next blank line, so not super sophisticated. Any "knowledge" of the code structure that Vim has is actually in the runtime files (language-specific ftplugins and syntax). I also know of some plugins that define some kind of "syntax-aware" text objects (these are probably built using pretty crude heuristics though). So there is something in there for a motivated individual to dig into, I think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants