在Sublime中(Golang),重命名变量/函数的常见做法是什么?

huangapple go评论88阅读模式
英文:

What is a common practice in rename a variable/function in sublime (Golang)?

问题

静态类型语言的一个优点是重构工具。至于Golang,我认为一个可以跨文件工作的重命名工具就足够了。Sublime文本编辑器中是否有这样的工具/插件?

目前可用的方法有:

  • Ctrl-D多光标选择,在文件内部工作得很好。

  • gorename在命令行中工作。是否可能在Sublime中进行重命名(而不需要切换到命令行再切回来)?

英文:

One of the advantage of static typed language is the tooling for refactoring. As for the Golang, I think simply a rename tool which can work across files is enough. Is there such a tool / plugin for sublime text editor?

Currently available approach:

  • Ctrl-D multi-cursor selection, works fine within a file.

  • gorename works in the command line. Is it possible to do the rename
    in sublime (without switching to the command line and back)?

答案1

得分: 1

搜索/替换文件是Sublime Text支持的功能,我相信这样做没有任何问题。
e: man subl

英文:

Search/replace over files is something Sublime Text supports I believe. Would there be anything wrong with that?
e: man subl

huangapple
  • 本文由 发表于 2015年11月11日 11:22:52
  • 转载请务必保留本文链接:https://go.coder-hub.com/33643753.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定