Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Is there any way (Plugin, Script) to add quotation marks (or square brackets or parentheses) at the beginning and the end of selected text via a keyboard shortcut in the Kate editor?

I think of something like selecting a word and then pressing Ctrl-U (this would upcase the selected word). Is there something similar for quotation marks?

The "Configure Shortcuts" menu does not provide this option.

share|improve this question

2 Answers 2

up vote 2 down vote accepted

One solution would be the following:

  • Go to Settings > Configure Kate > Editing
  • Activate the Auto brackets option

Now you are able to wrap the selected text with brackets.

Though there is one drawback. The Auto brackets option is "always on", meaning that once you type "(" the corresponding ")" also comes up.

share|improve this answer

I just checked out AutoKey, as I had read that it supports extensions via Python. There seems to be one script that sounds as if it does what you need (thought I haven't tried it out myself):

https://code.google.com/p/autokey/wiki/ContributedScripts#Key_Wrapper

share|improve this answer
    
thanks for your answer. Your suggestion would be an overall solution for the problem. I will try this later. However I would prefer a solution for Kate. And Kate does not seem to support Python scripts. –  user1251007 Jul 25 '12 at 9:00

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.