Translations:KDevelop5/Manual/Working with source code/76/en

From KDE UserBase Wiki
  • Snippets: This provides sequences of text that one uses over and over and doesn't want to type repeatedly. For example, in the project from which the picture above was created, there is a frequent need to write code like:
    if(vcs->isVersionControlled(source)) {
        VcsJob* job=vcs->copy(source, target);
        if(job) {
            return job->exec();
    
    The code segment will look exactly like this every time you need to use such a segment of code — which would make it a good candidate for a snippet.