Using Pluma in C++ exams

When I took EC327 and EC330 at BU, the lab computers were running CentOS. For the most part, I could use my own .vimrc or a portable installation of VSCode. But when exam time came around, I realized we needed to use locked-down, fresh user accounts. It was unfeasible to rewrite config files or download an editor.

Pluma is a powerful text editor included with the Mate desktop environment used in the CentOS distro. It’s a fork of gedit 2.

You can find it by Applications>Accessories>Pluma, or Applications>Application Finder and search for Pluma.

What makes Pluma very powerful and very legal for the exam is that you can have it include certain built in plugins without internet access. The following are a series of configuration steps that I could execute in less than a minute during the exam.

Pluma Configuration Guide

Open Preferences by Edit>Preferences

  1. View: Display line numbers, Highlight matching bracket
  2. Editor: set desired tab width and/or use spaces instead of tabs
  3. Font & Colors: Select a desired font and change the color scheme

The most important part of this guide is to enable the External Tools plugin on the Plugins tab

External Tools Setup

Open External Tools Manager by Tools>Manage External Tools

Notice that you can actually build C++ files from Pluma! All it requires is that we write a makefile for it to parse.

  1. In the External Tools Manager window, change* Applicability: All languages* to just C++. This ensures that our Build option only works for C++.
  2. Change the shortcut if needed. The lab computers cannot bind Ctrl+F8. I use Ctrl+Shift+B.
  3. Put the following universal makefile into the same directory as the source files.

For a basic makefile (make sure to indent using tabs):

all:	
    g++ -std=c++11 main.cpp -o main
clean:
	rm main