ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

rosed command saving

asked 2013-01-07 02:06:06 -0500

Abinaya gravatar image

updated 2013-01-07 02:46:33 -0500

KruseT gravatar image

I have given the command seeing below $ rosed beginner_tutorials CMakeLists.txt I want to add these 2 lines rosbuild_add_executable(talker src/talker.cpp) rosbuild_add_executable(listener src/listener.cpp) I just simply add the line now i don't know how to save the file

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
2

answered 2013-01-07 02:25:40 -0500

KruseT gravatar image

updated 2013-01-07 02:30:12 -0500

rosed starts the default editor for your system. You can find out what editor that is by invoking:

$ echo $EDITOR

That is probably vim for you, but maybe it could be emacs or something else. If the result of that call is empty, then on Ubuntu that means vim will be used.

You can google online for how to use that editor, or change the variable in your .bashrc to point to an editor that you prefer (e.g. nano is more self-explaining to novice linux users).

EDIT, with vim, press the Escape button, then write

:wq

The editor should (w)rite and (q)uit then.

edit flag offensive delete link more
0

answered 2013-01-07 02:45:04 -0500

allenh1 gravatar image

If you want to change your editor to something (I prefer nano), try:

echo "export EDITOR=nano" >> ~/.bashrc && source ~/.bashrc

When editing with nano, the command to save is control + o. Then exit with control + x. Simple enough!

edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-01-07 02:06:06 -0500

Seen: 1,938 times

Last updated: Jan 07 '13