Pluma: Text Wrapping Shortcut

Used every day in Ubuntu-Mate 16.04.

I like Pluma but it has an irritating nuisance - no quick way to change text wrapping! You have to go into Preferences to change it. Not even a menu or, better yet, hotkey to toggle this setting.

Here is my solution which involves a tiny script that toggles the setting using gsettings commands.

Maybe someone has a better way? I tried to get this script in the hotkey command to work directly but unsuccessfully. Anyone for the challenge?

  1. Create a script to toggle the wrap settings.
    Mine is: /home/bill/bin/pluma_wrap.sh

By the way, did you know if you create a ~/bin directory and logout/login it is detected and a login script automatically places it in your $PATH? A handy feature I've been using for years.

Here is my /home/bill/bin/pluma_wrap.sh file:

#!/bin/bash
# Toggles TEXT WRAP in Pluma

if [ $(gsettings get org.mate.pluma wrap-mode) = "'GTK_WRAP_NONE'" ]
then
    gsettings set org.mate.pluma wrap-mode GTK_WRAP_WORD
else
    gsettings set org.mate.pluma wrap-mode GTK_WRAP_NONE
fi

Be sure and make it executable. In Caja, it can be done with file Properties:

Test it in a terminal with Pluma open. It should work at this point.
Just enter pluma_wrap.sh if it's in ~/bin.

  1. Now it's just a matter of creating a hotkey to run it. I use Ctrl+Alt+W.

It's buried in System -> Preferences -> Hardware -> Keyboard Shortcuts

Now, text wrapping changes with a simple Ctrl+Alt+W!
All Comments Welcomed.

6 Likes

Nice. Like that a lot! Will be implementing that one. Cheers…:slight_smile:

1 Like

Bill:

Question. How'd you get your properties dialog box to look like that above? Mine looks like this, for instance -

Is it a thematic thing or a choice somewhere? I use 16.04, DE 1.14.1 but also have a 16.10 partition on another machine. Just curious...

Thanks, Michael

1 Like

Hi @mdooley,Sorry and good catch.

It's one of those things I set and forgot in dconf Editor:

I'll repair it, thanks.

Now, if only I could get compiz desktop screen capture to not include such a huge overscan... I don't want to edit every one. I use the super-fast method of screen shot, copy to clipboard, and paste right in the message without ever creating a file.

1 Like

Thanks Bill. I should’a looked in dconf editor.

Thanks, Bill_MI. That's excellent! I wish a native hotkey for this was implemented in Pluma.