ubuntukdevelop

typing brackets in code using kdev-python and Kubuntu 17.10


When writing Python code, I want automatic right-side brackets to be placed whenever I type a left-sided-bracket, with the cursor in-between the two so I can immediately type code in-between the brackets.

I watched a video that showed a programmer doing that, while using KDev-Python for KDevelop. But I'm unfamiliar with that IDE, and even after googling the internet, and reading through it's pdf manual, can't figure out how to activate that feature.

History of install: I installed KDevelop and KDev-Python both by typing this one install command: sudo apt install kdev-python under Konsole. (I didn't install KDevelop separately) I think both installed at that one time, because I have Python support, and KDevelop was there too. My Python interpreter is v 3.6.3, and included with Kubuntu 17.10 (along with a v2.7 interpreter). I looked through the KDevelop plugins to see what was there, and [Python Support -- Python Language Support] was listed and activated. That was the only plugin that mentioned Python. And nothing explicitly mentioned kdev-python


Solution

  • This is an optional feature in KTextEditor (as used in KDevelop, KATE and KWrite).

    Settings -> Configure KDevelop -> Editor -> Editing -> "Enable Automatic Brackets".