2

Everytime I need to input a piece of code such as "switch .. case" or "declaring a class", I desire a way I can rapidly achieve it by hitting a shortcut.

In many IDEs, we can do it by pressing some shortcut keys, and IDEs will paste a little piece of pre-defined code at the position of the focuse.

Is there any similar way in KDevelop? I'm not meaning the File/Project Templates here.

Thanks!

Leon
  • 1,489
  • 1
  • 12
  • 31
  • Certainly there are some kind of third party snippet plugins but questions to help to find such are off topic. – Öö Tiib Aug 31 '19 at 20:01

1 Answers1

3

Yes, use the 'Snippets' plugin distributed with Kate.

  1. Install the Kate editor. Several of the plugins included can also be used in KDevelop; there's been some discussion of distributing those separately but it hasn't happened yet.

  2. In KDevelop, use the menu Window -> Add Tool View and select 'Snippets'.

  3. There will be a 'Snippets' toolview. Click on entries to paste them, or you can bind a shortcut. You can add new entries and categories.

enter image description here

FLHerne
  • 267
  • 2
  • 5