Using rosed to Edit Files in ROS
From Lofaro Lab Wiki
Using rosed to Edit Files in ROS
1) Close all current terminals. In a new terminal, edit your bash file to use nano (an editor):
export EDITOR='nano -w'
Use
echo $EDITOR
And see a line print to the terminal to make sure the bash file change was successful.
2) Use rosed [package_name] [filename] to edit a file within a package:
rosed roscpp Logger.msg
This works similarly to other editors in a terminal. If running into trouble, try gedit.