Open application to edit text files from the command line

You can open (Up to my knowledge) any of the editors like this:

NAME_OF_EDITOR FILENAME

gedit filename (Ubuntu)
kate filename (Kubuntu)
bluefish filename
kwrite filename
libreoffice filename

You can even open a web page the same way
firefox filename.html
chrome filename.html
banshee filename.ogg or .mp3

You can see the tendency here..


To open a file using kate, you can run something like:

kate filename

This might show some messages like:

kate(3702)/kdecore (services) KMimeTypeFactory::parseMagic: Now parsing  "/usr/share/mime/magic"
kate(3702)/kdecore (services) KMimeTypeFactory::parseMagic: Now parsing  "/home/user/.local/share/mime/magic"
Bus::open: Can not get ibus-daemon's address. 
IBusInputContext::createInputContext: no connection to ibus-daemon

To remove these messages, redirect the error output stream to /dev/null:

kate filename 2>/dev/null

If you want to continue using the same terminal, add an & after the command:

kate filename 2>/dev/null &

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:

edit() { kate "$@" 2>/dev/null & }

If you prefer to use the command edit in Ubuntu also because you are used to do so you could also define an alias for your favourite editor like for Kate:

alias edit='kate'

To make this alias permant just add this line to ~/.bash_aliases.