Is there a way to make my own shortcuts for terminal in gedit?
I mean, for example if I want to compile a C++ source, when I press F9 I want it to make
g++ source_file.cpp (this is only an example)
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
For the command itself, you can use aliases.
~/.bash_aliases and add your alias like this:
alias foobar="g++ /location/of/file/file.cpp"
Where foobar is the name of the custom command.
. ~/.bash_aliases to reload the file.
As far as the hotkey part, I'll come back and add to my answer if I figure anything out about that, or hopefully someone else will know.
EDIT: Here is the full answer to your question (as best I can tell): Custom keyboard shortcut to lauch a terminal and run a command in Unity. It looks like it renders the alias section void, but I will leave it there.
EDIT2: Via http://ubuntuforums.org/archive/index.php/t-433538.html, check out gedit external tools: https://live.gnome.org/Gedit/Plugins/ExternalTools. This will give you a variable for your current file name for use in the command.