When installing the TextWrangler in OSX you also get an edit
command which allows you to open any text file from the command line.
Is it possible to have a similar functionality in Ubuntu to type some command on the terminal to open a file in a specific text editor (say Kate)?
Best Answer
To open a file using
kate
, you can run something like:This might show some messages like:
To remove these messages, redirect the error output stream to
/dev/null
:If you want to continue using the same terminal, add an
&
after the command:If you want to run
edit filename
to open it, you could create a bash function in your~/.bashrc
file. Add the next code to your~/.bashrc
file: