1

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.

2

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.

1

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

  • 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

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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