I want my terminal to automatically close my brackets, quotation marks, etc.
For example, I want to type
( and I want it to complete to
where | represents the mouse cursor.
Is there a way to do this? If so, how?
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
~/.inputrc file, which allows binding certain keys to macros. In our case, we need macro that automatically types in "()" and Ctrl+b (which is move back one word ) shortcut.
Open the file with gedit or any other text editor and type in the following
That will bind Ctrl + ] to do what you want. Now open terminal or call a new instance of the shell and test it out.
You can try binding it to any other keyboard short-cut, but there is only so much you can do.