go-plus icon indicating copy to clipboard operation
go-plus copied to clipboard

Add support for gorename

Open hansrodtang opened this issue 12 years ago • 8 comments

There is a new tool added to the tools repository that looks interesting; gorename. The tool allows you to easily rename identifiers across a project. Might be worth a look.

https://groups.google.com/d/msg/golang-nuts/96hGPXYfqsM/WreOUy9qOT4J

hansrodtang avatar Nov 12 '14 19:11 hansrodtang

:+1: I like this in concept. @hansrodtang if you would like to create a PR for this I'd gladly welcome it; if I work on it, it'll be after gocode integration is done.

joefitzgerald avatar Nov 12 '14 23:11 joefitzgerald

Isn't essentially this the same thing as gofmt -r pattern -> replacement?

soygul avatar Nov 18 '14 12:11 soygul

@soygul, no it uses static analysis to determine what to change. It is not the same as pattern matching.

bryanl avatar Dec 15 '14 13:12 bryanl

Ok, a lot better than I imagined then! Although gofmt pattern matching is dummy regular regex, it recognizes Go expressions and does not rename comments and stuff.

soygul avatar Dec 15 '14 13:12 soygul

This package is month old https://github.com/redefiance/atom-go-rename probably would be best to integrate?

mishak87 avatar Feb 24 '15 22:02 mishak87

I'd appreciate if someone could review and comment on my pull request for this. There's a few things I can't quite figure out and a lot of things I'm sure could be done better.

https://github.com/joefitzgerald/go-plus/pull/174

zmb3 avatar Mar 25 '15 22:03 zmb3

:+1: for this feature

jchannon avatar Oct 26 '15 10:10 jchannon

This shipped in v4.0.0 thanks to @zmb3 :tada:.

joefitzgerald avatar Mar 24 '16 23:03 joefitzgerald