edit - Edit File¶
edit search and edit a file inside a package using command line.
It is provided by the
When a correct package name and file name is provided, it will open that file with an editor.
$ colcon edit <package_name> <file_name>
To enable auto-complete, check out the installation guide.
Hidden files and
.pyc files are ignored.
If multiple files under the same name are present, they will all be listed
and you can type in the index number to select which file to edit.
vim is the editor that will be used, but you can also use
other editors by specifying
$EDITOR environment variable to the ones
For example, to use Visual Studio Code, simply run
$ export EDITOR=code