The Cookie Machine - Click here to drag window

DUMMY TEXT - Real text set in assets/js/theCookieMachine.js

Views: 5,112     Votes:  2 
Tags: gedit   plugins   programming  
Link: 🔍 See Original Answer on Ask Ubuntu 🔗

Title: Code completion for gedit
ID: /2018/10/17/Code-completion-for-gedit
Created: October 17, 2018    Edited:  June 12, 2020
Upload: November 24, 2022    Layout:  post
TOC: false    Navigation:  false    Copy to clipboard:  false

Snippets plug-in for gedit

gedit has more plug-ins than I can remember but one of them is called snippets and it is very popular.

Supported languages

I do most of my coding in bash but c is also supported along with dozens of other languages including HTML and CSS which are also on your shopping list.

Installation of gedit plug-ins and the snippets one in particular is straight forward.

Review the default auto-completion options from the top menu by selecting Tools -> Manage Snippets...:

gedit snippets show languages.gif

You can add many more auto-complete options and even assign them shortcut keys.

Auto-completion using Tab key

When using bash I almost always forget the syntax for certain commands. One of them is the for loop with C-like syntax option. In this GIF animation why type the letters for followed by the Tab key for auto complete:

gedit snippets for loop.gif

There are other gedit plug-ins active in the GIF animation above. The bottom of the screen is the external terminal interface where you can type shell commands. The right hand slide is the thumbnail slider. The grey area in between warns you when your typing is longer than 80 characters, or whatever size you choose.

Tool Output at the very bottom means external tools is enabled. This allows you to launch commands via hot keys and see the output. Handy if for example you want to pass your file to a LINT checker or compiler.

⇧ Set CPU governor to performance in 18.04 Uable to print after upgrading Ubuntu 16.04 to 18.04 (HP MFC-7470DW)  ⇩