Stock GTK Icon OK TextWrap - A Gedit Plugin

TextWrap is a Plugin for the default GNOME text editor gedit, that gives you quick and easy access to the Text Wrap mode currently active (aka , Word Wrap, Line Break, Wrap Lines, Paragraph Wrap etc.) setting of the active document. It inserts an additional entry in the "View" menu for quick access and an icon in the "Toolbar" for even quicker access to it:

Screenshot TextWrap

Behaviour

Textwrap mode is initialy set to the defaults set in the Preferences dialog for any document when opened as long it is opened in gedit. TextWrap acts as a toggle for the whole Textwrap setting block in the Preferences (i.e. Textwrap enabled or not _and_ if wrapping occurs at word boundaries or not) and therefore toggles between On and Off. TextWrap toggle is kept for every document individualy.

Download

You might want to download the TextWrap plugin in an archive having everything and unpack the archiv to a place of your choice (your home directory is used herein as an example).

Or if you know what you're doing you might download the minimal files needed directly:

Install

General procedure

The procedure in commands (after download)

From inside your ( Applications -> Accesories -> ) Terminal application type (or grab commands from here and insert there):

$ cd
$ tar -xf TextWrap-Gedit-Plugin-0.2.1.tar.gz
$ cd TextWrap-Gedit-Plugin-0.2.1
$ test -d ~/.gnome2/gedit/plugins || mkdir ~/.gnome2/gedit/plugins
$ cp TextWrap.py TextWrap.gedit-plugin ~/.gnome2/gedit/plugins/

Activate the plugin (optional):

$ gconftool --get /apps/gedit-2/plugins/active-plugins | grep "TextWrap" >/dev/null || 
( OLDVALUE=$(gconftool --get /apps/gedit-2/plugins/active-plugins); 
NEWVALUE=$(echo $OLDVALUE | sed 's/\[/\[TextWrap,/'); 
gconftool --set --type=list --list-type=string /apps/gedit-2/plugins/active-plugins $NEWVALUE )

or do it through the Preferences dialog:
TextWrap plugin in gedit Preference Dialog

Pussy (aka Windows) Installation

if the commands above scare you, you might download this minimalistic install script and execute it. you might execute it by double clicking on the downloaded file named TextWrap-SETUP.sh. otherwise you have to open a command prompt (window) and execute it by entering 'sh TextWrap-SETUP.sh' into it. USE ON YOUR OWN RISK

Keyboard Shortcut

Currently hardcoded to: Shift-Ctrl-B. The Keyboard Shortcut is setable through Hannes Matuschek's plugin Edit Shortcuts. Scroll down to 'PluginActions' and find TextWrap there. (If you have troubles with setting - as me on the first try - edit ~/.gnome2/accels/gedit)

BUGS

TODO

Other gedit plugins dealing with the same issue

Making Text-Wraps permanent

Derek@TheDailyLinux came up with a nice approch to get permanent word-wraps into files:

Adding Hard Word Wrap/Line Break Feature to Gedit

And Tomek showed up on his blog with a plugin to get hard-wraps into the current file:

Gedit-rewrap-plugin from bitbucket

Contact

gedit (@) hartmann-it-design (.) de

License

TextWrap is licensed under the GNU General Public License 3
Logo GPL 3

 

Who's behind this?

hartmann-it-design.de