Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Emacs Rename Variable

Tags:

emacs

ide

How do I rename a variable in emacs? Eclipse has a neat "rename" refactoring action which lets you rename a variable in a scoping-aware way, which can be much easier to use than doing localized replace-strings, especially if the variable name is a character like e. Does emacs have a similar functionality built in?

like image 899
nnythm Avatar asked Mar 29 '12 07:03

nnythm


1 Answers

New Emacs has M-s . to select symbol under cursor, then you can C-M-% and it will use currently selected symbol to perform replacements. NOTE This is just plain string replacement, not like the IDE 'rename variable' feature.

like image 98
dolzenko Avatar answered Sep 21 '22 14:09

dolzenko