How can I rename functions project wide?
I am using spacemacs and also with tern, and it look like tern can only rename variables.
Emacs Stack Exchange is a question and answer site for those using, extending or developing Emacs. It only takes a minute to sign up.Sign up to join this community
Maybe you could try to use
SPC p R which runs the command
projectile-replace this might not be exactly what you want (a specific js refactor tool) but it gets the job done and is language agnostic.
Another more advanced option would be to search the name of that function with helm, once you are in the helm buffer
C-c C-e runs
helm-ag-edit, this will give you a buffer with your matches, in this buffer you can run
iedit and rename that function across different files at once, you will need to
C-c C-c to persist your changes though.
I use this all the time (here the link where I first read about this https://gitter.im/syl20bnr/spacemacs?at=573d831c0cb634927f80545e)
js2-refactor package which does many things but doesn't rename functions. Perhaps you could extend it.